]> 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)
committerNathan Cutler <ncutler@suse.com>
Mon, 6 Nov 2017 12:35:37 +0000 (13:35 +0100)
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>
(cherry picked from commit 531195d80d5bac774d58b210307eb19b57d26345)

src/rgw/rgw_rados.cc

index 6d4a65ae619a11199ed909fd23f614cc3ff7c6ce..b44b195cfd552feef397d373e0d7d1b53631752f 100644 (file)
@@ -12190,6 +12190,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();