From: Albert Tu Date: Tue, 28 Jun 2016 02:38:07 +0000 (+0800) Subject: rgw: fix double counting in RGWRados::update_containers_stats() X-Git-Tag: ses5-milestone5~531^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5dd825aed25588843dc4834be3f5fdf10d93bc68;p=ceph.git rgw: fix double counting in RGWRados::update_containers_stats() Fixes: http://tracker.ceph.com/issues/16188 Signed-off-by: Albert Tu --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 078fe9cd84c8..ba4c2db20207 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -10841,6 +10841,9 @@ int RGWRados::update_containers_stats(map& m) for (iter = m.begin(); iter != m.end(); ++iter) { RGWBucketEnt& ent = iter->second; rgw_bucket& bucket = ent.bucket; + ent.count = 0; + ent.size = 0; + ent.size_rounded = 0; map headers; int r = cls_bucket_head(bucket, RGW_NO_SHARD, headers);