]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: preserve all attrs if intra-zone copy
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 9 Sep 2015 22:41:02 +0000 (15:41 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Wed, 23 Sep 2015 20:37:40 +0000 (14:37 -0600)
Fixes: #13015
Intra zone copy requires that all objects' attributes are preserved.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 77cb503ba057f033825aa40d57dee42e838c67ac)

src/rgw/rgw_rados.cc

index 0678856a3877641e9527ebe3d2715ce36165b9f5..e84a3d9310cc19f783c2d2810e7835d0542a3b69 100644 (file)
@@ -3815,6 +3815,8 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& obj_ctx,
 
   if (source_zone.empty()) {
     set_copy_attrs(src_attrs, attrs, attrs_mod);
+  } else {
+    attrs = src_attrs;
   }
 
   ret = cb.complete(etag, mtime, set_mtime, attrs);