From: yuliyang_yewu Date: Fri, 24 Jul 2020 00:57:31 +0000 (+0800) Subject: rgw: fix md5 not match for RGWBulkUploadOp upload when enable rgw compression X-Git-Tag: v15.2.17~60^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f216db75ad72a58f3d75be189c05fa24d54e17f2;p=ceph.git rgw: fix md5 not match for RGWBulkUploadOp upload when enable rgw compression Fixes: https://tracker.ceph.com/issues/46625 Signed-off-by: yuliyang_yewu (cherry picked from commit 3fc487d25e81ca2135729b120b9c832b42a26266) Conflicts: src/rgw/rgw_op.cc Cherry-pick notes: - cs_info.compressor_message = compressor->get_compressor_message(); line not on Octopus --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 2339dccb7fd0..fe0ad68758a6 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -7366,7 +7366,7 @@ int RGWBulkUploadOp::handle_file(const boost::string_ref path, ceph::bufferlist tmp; RGWCompressionInfo cs_info; cs_info.compression_type = plugin->get_type_name(); - cs_info.orig_size = s->obj_size; + cs_info.orig_size = size; cs_info.blocks = std::move(compressor->get_compression_blocks()); encode(cs_info, tmp); attrs.emplace(RGW_ATTR_COMPRESSION, std::move(tmp));