From: liuchang0812 Date: Wed, 5 Apr 2017 11:44:47 +0000 (+0800) Subject: rgw/rgw_bucket: update is_truncated option in rgw_read_user_buckets function X-Git-Tag: v12.0.2~109^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00cdfce27cff72257f61062a42f50daf8cd41a26;p=ceph.git rgw/rgw_bucket: update is_truncated option in rgw_read_user_buckets function 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 --- diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 8b2bc5f46df1..e9221783e528 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -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& m = buckets.get_buckets(); ret = store->update_containers_stats(m);