From f7f5cc7aa19ff291f43ae10e64db705c5c6d302d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 27 Mar 2017 11:58:41 +0800 Subject: [PATCH] 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 --- src/librbd/io/ImageRequest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/io/ImageRequest.cc b/src/librbd/io/ImageRequest.cc index 72813359cf6..71ae944240e 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; -- 2.39.5