From a49255f34c5ba8c06b8e8660e49dd984ae3d41f1 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Fri, 17 Oct 2014 13:19:59 +0800 Subject: [PATCH] librbd: fix compile warning in librbd/internal.cc. librbd/internal.cc: In function 'void librbd::readahead(librbd::ImageCtx*, const std::vector >&, const md_config_t*)': librbd/internal.cc:3150:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ictx->total_bytes_read > conf->rbd_readahead_disable_after_bytes; ^ Signed-off-by: Jianpeng Ma --- src/librbd/internal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 7053cc9e08107..5fe47b44cb60d 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -3147,7 +3147,7 @@ reprotect_and_return_err: } ictx->md_lock.get_write(); bool abort = conf->rbd_readahead_disable_after_bytes != 0 && - ictx->total_bytes_read > conf->rbd_readahead_disable_after_bytes; + ictx->total_bytes_read > (uint64_t)conf->rbd_readahead_disable_after_bytes; ictx->total_bytes_read += total_bytes; ictx->snap_lock.get_read(); uint64_t image_size = ictx->get_image_size(ictx->snap_id); -- 2.39.5