]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: copy object data if target bucket is in a different pool
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 12 Aug 2014 20:36:11 +0000 (13:36 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 14 Aug 2014 18:25:32 +0000 (11:25 -0700)
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 <yehuda@redhat.com>
src/rgw/rgw_rados.cc

index 65e5de923460905b4673e68ed27fa6b0c0ee87eb..a6ad5af3b1a1f7470cd4ee3aa648907af4ee1e65 100644 (file)
@@ -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()) {