From be430e2b8baf877cda58dc09b2e9391b8c798587 Mon Sep 17 00:00:00 2001 From: Marcus Watts Date: Wed, 28 Aug 2024 11:42:05 -0400 Subject: [PATCH] rgw/storage class: don't store/report STANDARD storage class. 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 --- src/rgw/driver/rados/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc index 32701f6fc72..df899673826 100644 --- a/src/rgw/driver/rados/rgw_rados.cc +++ b/src/rgw/driver/rados/rgw_rados.cc @@ -3369,7 +3369,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); -- 2.39.5