]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Erase old storage class attr when the object is rewrited using radosgw-admin. 50520/head
authorzhangzhiming <zhangzhm1@chinatelecom.cn>
Wed, 9 Feb 2022 00:45:52 +0000 (08:45 +0800)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Wed, 24 Jul 2024 17:31:59 +0000 (00:31 +0700)
Fixes: https://tracker.ceph.com/issues/53790
Signed-off-by: zhiming zhang <zhangzhm1@chinatelecom.cn>
(cherry picked from commit 1b6ca99f1c33e0a291e76d7e7049b8d50893a7f4)

src/rgw/rgw_rados.cc

index 003a889e231769d6bf65e4285a4f8009211f41e3..4155f913a911b991a09f5b442656354c5ba10913 100644 (file)
@@ -3677,6 +3677,7 @@ int RGWRados::rewrite_obj(rgw::sal::Object* obj, const DoutPrefixProvider *dpp,
 
   attrset.erase(RGW_ATTR_ID_TAG);
   attrset.erase(RGW_ATTR_TAIL_TAG);
+  attrset.erase(RGW_ATTR_STORAGE_CLASS);
 
   return store->getRados()->copy_obj_data(rctx, obj->get_bucket(),
                                          obj->get_bucket()->get_info().placement_rule,