]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: encode dest storage_class when copying object
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 10 Oct 2018 00:22:52 +0000 (17:22 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 4 Jan 2019 03:00:20 +0000 (19:00 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_rados.cc

index 0f7646511d5a7f93cdab898b1dc5d74d7db577ea..bf2b67fe8bb090dd15a077266193b826761b439f 100644 (file)
@@ -4610,6 +4610,11 @@ int RGWRados::copy_obj(RGWObjectCtx& obj_ctx,
     ptail_rule = &dest_bucket_info.placement_rule;
   }
 
+  auto& dest_storage_class = ptail_rule->get_storage_class();
+  bufferlist scbl;
+  scbl.append(dest_storage_class);
+  attrs[RGW_ATTR_STORAGE_CLASS] = scbl;
+
   if (!get_obj_data_pool(*src_rule, src_obj, &src_pool)) {
     ldout(cct, 0) << "ERROR: failed to locate data pool for " << src_obj << dendl;
     return -EIO;