]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_bucket: update is_truncated option in rgw_read_user_buckets function
authorliuchang0812 <liuchang0812@gmail.com>
Wed, 5 Apr 2017 11:44:47 +0000 (19:44 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Wed, 5 Apr 2017 11:44:47 +0000 (19:44 +0800)
The function called `rgw_read_user_buckets` has one option `bool *is_truncated`
which should be updated, and we could use `is_truncated` to avoid unnessesary
iteration.

Fixes: http://tracker.ceph.com/issues/19365
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
src/rgw/rgw_bucket.cc

index 8b2bc5f46df164cf37b578915a2b49891091dd22..e9221783e5285d6c408bab071aaa88143a332afb 100644 (file)
@@ -140,6 +140,10 @@ int rgw_read_user_buckets(RGWRados * store,
 
   } while (truncated && total < max);
 
+  if (is_truncated != nullptr) {
+    *is_truncated = truncated;
+  }
+
   if (need_stats) {
     map<string, RGWBucketEnt>& m = buckets.get_buckets();
     ret = store->update_containers_stats(m);