From: Casey Bodley Date: Mon, 26 Aug 2019 13:28:30 +0000 (-0400) Subject: rgw: fix default storage class for get_compression_type X-Git-Tag: v14.2.5~107^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9e8c3994a7f3608e5117b019f1fed78375f39afd;p=ceph.git rgw: fix default storage class for get_compression_type 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 (cherry picked from commit 2b3d6e316fc6c0d935e1cd76666a88c3247d8bde) --- diff --git a/src/rgw/rgw_zone.cc b/src/rgw/rgw_zone.cc index 7c9f414ca17d..4dee08bd5f32 100644 --- a/src/rgw/rgw_zone.cc +++ b/src/rgw/rgw_zone.cc @@ -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; }