From: Matthew N. Heler Date: Wed, 10 Jun 2026 19:21:30 +0000 (-0500) Subject: rgw: drop dedup shared-manifest and blake3 attrs on object rewrites X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=15a0e8f172406eca23100b72f2fc6955c94cd14b;p=ceph.git rgw: drop dedup shared-manifest and blake3 attrs on object rewrites Do not carry RGW_ATTR_SHARE_MANIFEST or RGW_ATTR_BLAKE3 when object data or manifest ownership is rewritten through admin rewrite, remote fetch, CopyObject, or lifecycle transition. Both attributes describe RGW dedup state for an existing RADOS layout: the shared-manifest marker and the blake3 digest of the object's on-disk bytes. Once a path writes a new layout or creates a new destination head with its own refcount tag, preserving them leaves stale dedup on the destination. Signed-off-by: Matthew N. Heler --- diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc index 151aca42d2e6..b473096d7bc6 100644 --- a/src/rgw/driver/rados/rgw_rados.cc +++ b/src/rgw/driver/rados/rgw_rados.cc @@ -3999,6 +3999,8 @@ int RGWRados::rewrite_obj(RGWBucketInfo& dest_bucket_info, const rgw_obj& obj, c attrset.erase(RGW_ATTR_ID_TAG); attrset.erase(RGW_ATTR_TAIL_TAG); attrset.erase(RGW_ATTR_STORAGE_CLASS); + attrset.erase(RGW_ATTR_SHARE_MANIFEST); + attrset.erase(RGW_ATTR_BLAKE3); ACLOwner owner; if (auto i = attrset.find(RGW_ATTR_ACL); i != attrset.end()) { @@ -4890,6 +4892,8 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& dest_obj_ctx, if (!keep_tags) { attrs.erase(RGW_ATTR_TAGS); } + attrs.erase(RGW_ATTR_SHARE_MANIFEST); + attrs.erase(RGW_ATTR_BLAKE3); if (copy_if_newer) { uint64_t pg_ver = 0; @@ -5300,6 +5304,8 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx, if (copy_data) { /* refcounting tail wouldn't work here, just copy the data */ attrs.erase(RGW_ATTR_TAIL_TAG); + attrs.erase(RGW_ATTR_SHARE_MANIFEST); + attrs.erase(RGW_ATTR_BLAKE3); // Data is rewritten as a single stream; drop stale multipart boundaries attrs.erase(RGW_ATTR_CRYPT_PARTS); attrs.erase(RGW_ATTR_CRYPT_PART_NUMS); @@ -5340,6 +5346,8 @@ int RGWRados::copy_obj(RGWObjectCtx& src_obj_ctx, if (!copy_itself) { aio = rgw::make_throttle(cct->_conf->rgw_max_copy_obj_concurrent_io, y); attrs.erase(RGW_ATTR_TAIL_TAG); + attrs.erase(RGW_ATTR_SHARE_MANIFEST); + attrs.erase(RGW_ATTR_BLAKE3); manifest = *amanifest; const rgw_bucket_placement& tail_placement = manifest.get_tail_placement(); if (tail_placement.bucket.name.empty()) { @@ -5695,6 +5703,8 @@ int RGWRados::transition_obj(RGWObjectCtx& obj_ctx, } attrs.erase(RGW_ATTR_ID_TAG); attrs.erase(RGW_ATTR_TAIL_TAG); + attrs.erase(RGW_ATTR_SHARE_MANIFEST); + attrs.erase(RGW_ATTR_BLAKE3); ACLOwner owner; if (auto i = attrs.find(RGW_ATTR_ACL); i != attrs.end()) {