From: Matthew N. Heler Date: Thu, 26 Mar 2026 01:32:06 +0000 (-0500) Subject: rgw: always decompress in CopyObject when source is compressed X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9bccd831d8be678dcf09c78cab52e88ea8f44e5e;p=ceph.git rgw: always decompress in CopyObject when source is compressed CopyObject skipped decompression when the source was encrypted, passing compressed ciphertext to the write side. The compressor then re-compressed already-compressed data, corrupting the object. The guard was overly broad. It should have checked whether decrypt is available rather than skipping decompress for all encrypted sources. Signed-off-by: Matthew N. Heler --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index bd3cfe2a4e2d..d4b066caa1d1 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -5946,7 +5946,7 @@ public: } bool src_encrypted = s->src_object->get_attrs().count(RGW_ATTR_CRYPT_MODE); - if (need_decompress && !src_encrypted) { + if (need_decompress) { obj_size = decompress_info.orig_size; s->src_object->set_obj_size(obj_size); static constexpr bool partial_content = false;