]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: usage_iterate_range end conditions
authorRobin H. Johnson <robin.johnson@dreamhost.com>
Mon, 12 Mar 2018 21:42:00 +0000 (14:42 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 15 Mar 2018 17:57:57 +0000 (10:57 -0700)
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 <yehuda@redhat.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
src/cls/rgw/cls_rgw.cc

index 9eb3e88548b7f9b8b0cfb2fdeef607d20c622225..90191ac4c695e38df5bf117fd3ce2359c388f322 100644 (file)
@@ -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)