From 00cdfce27cff72257f61062a42f50daf8cd41a26 Mon Sep 17 00:00:00 2001 From: liuchang0812 Date: Wed, 5 Apr 2017 19:44:47 +0800 Subject: [PATCH] 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 --- src/rgw/rgw_bucket.cc | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.47.3