]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: take placement_rule from bucket info in update_containers_stats
authorCasey Bodley <cbodley@redhat.com>
Tue, 31 Oct 2017 20:26:54 +0000 (16:26 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 1 Nov 2017 13:08:27 +0000 (09:08 -0400)
in case the cls_user_bucket_entry doesn't contain a placement_rule, take
it from the bucket instance info

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc

index 6bcb81a0d20b4eeb5779d99cabf1227cced0149e..1b5844955d82c7d9e1186faa4ed11d57295e14fa 100644 (file)
@@ -12128,6 +12128,10 @@ int RGWRados::update_containers_stats(map<string, RGWBucketEnt>& m)
         ent.size_rounded += stats.total_size_rounded;
       }
     }
+
+    // fill in placement_rule from the bucket instance for use in swift's
+    // per-storage policy statistics
+    ent.placement_rule = std::move(bucket_info.placement_rule);
   }
 
   return m.size();