From: Casey Bodley Date: Tue, 31 Oct 2017 20:26:54 +0000 (-0400) Subject: rgw: take placement_rule from bucket info in update_containers_stats X-Git-Tag: v13.0.1~321^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=531195d80d5bac774d58b210307eb19b57d26345;p=ceph.git rgw: take placement_rule from bucket info in update_containers_stats 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 --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 6bcb81a0d20b..1b5844955d82 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -12128,6 +12128,10 @@ int RGWRados::update_containers_stats(map& 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();