From 5d3a7e595f47455896304bf358e5251915d0f16f Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 12 Aug 2014 13:36:11 -0700 Subject: [PATCH] rgw: copy object data if target bucket is in a different pool Fixes: #9039 Backport: firefly The new manifest does not provide a way to put the head and the tail in separate pools. In any case, if an object is copied between buckets in different pools, we may really just want the object to be copied, rather than reference counted. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 65e5de9234609..a6ad5af3b1a1f 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3333,7 +3333,7 @@ set_err_state: return ret; } - bool copy_data = !astate->has_manifest; + bool copy_data = !astate->has_manifest || (src_obj.bucket.data_pool != dest_obj.bucket.data_pool); bool copy_first = false; if (astate->has_manifest) { if (!astate->manifest.has_tail()) { -- 2.39.5