]> 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)
committerCasey Bodley <cbodley@redhat.com>
Mon, 26 Aug 2019 13:28:43 +0000 (09:28 -0400)
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>
src/rgw/rgw_zone.cc

index 812b037d98775840d1188423e4a78e2f157015ab..a0519adcab12bfc4cd3949400fa16f62bf98fae1 100644 (file)
@@ -1755,7 +1755,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;
 }