]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/storage class: don't store/report STANDARD storage class.
authorMarcus Watts <mwatts@redhat.com>
Wed, 28 Aug 2024 15:42:05 +0000 (11:42 -0400)
committerThomas Serlin <tserlin@redhat.com>
Mon, 22 Sep 2025 19:18:18 +0000 (15:18 -0400)
While 'STANDARD' is a valid storage class, it is not supposed
to ever be returned when fetching an object.  This change suppresses
storing 'STANDARD' as the attribute value, so that objects
explicitly created with 'STANDARD' will in fact be indistinguishable
from those where it was implicitly set.

Fixes: https://tracker.ceph.com/issues/67786
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit b95e743ab9374cd3463a29c5f719ffce1c9fb28a)

Resolves: rhbz#2300284

src/rgw/driver/rados/rgw_rados.cc

index 4e886f1bbf3ec16249188e5df9f2465658475840..4e05775df2b0a8356fe33a5730a02ff93bf4cb5b 100644 (file)
@@ -3363,7 +3363,7 @@ int RGWRados::Object::Write::_do_write_meta(uint64_t size, uint64_t accounted_si
     op.setxattr(RGW_ATTR_SOURCE_ZONE, bl);
   }
 
-  if (!storage_class.empty()) {
+  if (!storage_class.empty() && storage_class != RGW_STORAGE_CLASS_STANDARD) {
     bufferlist bl;
     bl.append(storage_class);
     op.setxattr(RGW_ATTR_STORAGE_CLASS, bl);