]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix double counting in RGWRados::update_containers_stats() 10148/head
authorAlbert Tu <albert.t@inwinstack.com>
Tue, 28 Jun 2016 02:38:07 +0000 (10:38 +0800)
committerNathan Cutler <ncutler@suse.com>
Wed, 6 Jul 2016 08:42:20 +0000 (10:42 +0200)
Fixes: http://tracker.ceph.com/issues/16188
Signed-off-by: Albert Tu <albert.t@inwinstack.com>
(cherry picked from commit 5dd825aed25588843dc4834be3f5fdf10d93bc68)

src/rgw/rgw_rados.cc

index 687b61be3c1d7e84da974e66ec7967536ebdafd3..b0613ddc10b1d12aec3c9be6d82bef703d2cb023 100644 (file)
@@ -10658,6 +10658,9 @@ int RGWRados::update_containers_stats(map<string, RGWBucketEnt>& 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<string, rgw_bucket_dir_header> headers;
     int r = cls_bucket_head(bucket, RGW_NO_SHARD, headers);