From: Kefu Chai Date: Mon, 27 Mar 2017 03:58:41 +0000 (+0800) Subject: librbd: pass an uint64_t to clip_io() as the 3rd param X-Git-Tag: v12.0.2~302^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f7f5cc7aa19ff291f43ae10e64db705c5c6d302d;p=ceph.git librbd: pass an uint64_t to clip_io() as the 3rd param because, on arm32, size_t is "unsigned", while uint64_t is "long long unsigned int", compiler is not able to promote the former to the latter automatically. and ImageRequest::Extents::value_type::second_type is indeed uint64_t, which is expected by clip_io(). so let's just use "auto" here. Fixes: http://tracker.ceph.com/issues/18938 Signed-off-by: Kefu Chai --- diff --git a/src/librbd/io/ImageRequest.cc b/src/librbd/io/ImageRequest.cc index 72813359cf63..71ae944240e8 100644 --- a/src/librbd/io/ImageRequest.cc +++ b/src/librbd/io/ImageRequest.cc @@ -180,7 +180,7 @@ template int ImageRequest::clip_request() { RWLock::RLocker snap_locker(m_image_ctx.snap_lock); for (auto &image_extent : m_image_extents) { - size_t clip_len = image_extent.second; + auto clip_len = image_extent.second; int r = clip_io(get_image_ctx(&m_image_ctx), image_extent.first, &clip_len); if (r < 0) { return r;