]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix default storage class for get_compression_type
authorCasey Bodley <cbodley@redhat.com>
Mon, 26 Aug 2019 13:28:30 +0000 (09:28 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 21 Oct 2019 20:18:52 +0000 (22:18 +0200)
if a PUT request does not specify a storage class, use the default
STANDARD storage class when looking up its compression type

Fixes: https://tracker.ceph.com/issues/40935
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 2b3d6e316fc6c0d935e1cd76666a88c3247d8bde)

src/rgw/rgw_zone.cc

index 7c9f414ca17da38be0e34ce56013729a30f72296..4dee08bd5f32944e8e467d6d584d9dc51f267a8b 100644 (file)
@@ -1759,7 +1759,7 @@ const string& RGWZoneParams::get_compression_type(const rgw_placement_rule& plac
   if (p == placement_pools.end()) {
     return NONE;
   }
-  const auto& type = p->second.get_compression_type(placement_rule.storage_class);
+  const auto& type = p->second.get_compression_type(placement_rule.get_storage_class());
   return !type.empty() ? type : NONE;
 }