From: Robin H. Johnson Date: Mon, 12 Mar 2018 21:42:00 +0000 (-0700) Subject: cls/rgw: usage_iterate_range end conditions X-Git-Tag: v13.1.0~297^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=163c49fd1da8e819a0ff8c7c7aaa550b01b8012a;p=ceph.git cls/rgw: usage_iterate_range end conditions If both end & start conditions are passed, we need to signal that there are no more results when returning because the end condition is satisifed. Suggested-by: Yehuda Sadeh Signed-off-by: Robin H. Johnson --- diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 9eb3e88548b..90191ac4c69 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -2978,8 +2978,10 @@ static int usage_iterate_range(cls_method_context_t hctx, uint64_t start, uint64 continue; /* keys are sorted by epoch, so once we're past end we're done */ - if (e.epoch >= end) + if (e.epoch >= end) { + *truncated = false; return 0; + } ret = cb(hctx, key, e, param); if (ret < 0)