]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: pass an uint64_t to clip_io() as the 3rd param 14159/head
authorKefu Chai <kchai@redhat.com>
Mon, 27 Mar 2017 03:58:41 +0000 (11:58 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 27 Mar 2017 04:04:35 +0000 (12:04 +0800)
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 <kchai@redhat.com>
src/librbd/io/ImageRequest.cc

index 72813359cf630fcee85ee1db63cd0c499b5dc229..71ae944240e80a87f318e51b0da84a28e638882b 100644 (file)
@@ -180,7 +180,7 @@ template <typename I>
 int ImageRequest<I>::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;