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 <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-03-27 11:58:41 +08:00
parent e32b1b8793
commit f7f5cc7aa1

View 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;