]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: interface adjustment following a rebase
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 2 Sep 2014 22:46:24 +0000 (15:46 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 16 Jan 2015 22:32:52 +0000 (14:32 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_admin.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index 83befef9eb0bc3cc27d490c0dad23d8c6b4d0cad..038b3e28c61ca4e778738f1a3f9409ca66229a6c 100644 (file)
@@ -1934,7 +1934,7 @@ next:
       }
     }
     if (need_rewrite) {
-      ret = store->rewrite_obj(bucket_info.owner, obj);
+      ret = store->rewrite_obj(bucket_info, obj);
       if (ret < 0) {
         cerr << "ERROR: object rewrite returned: " << cpp_strerror(-ret) << std::endl;
         return -ret;
@@ -2027,7 +2027,7 @@ next:
           if (!need_rewrite) {
             formatter->dump_string("status", "Skipped");
           } else {
-            r = store->rewrite_obj(bucket_info.owner, obj);
+            r = store->rewrite_obj(bucket_info, obj);
             if (r == 0) {
               formatter->dump_string("status", "Success");
             } else {
index ad7b06f85991204a8ff999a10d71351063f2f055..0323b6db8aeb3441b901ff338c1fadbefab2372e 100644 (file)
@@ -3196,7 +3196,7 @@ public:
     }
 };
 
-int RGWRados::rewrite_obj(const string& bucket_owner, rgw_obj& obj)
+int RGWRados::rewrite_obj(RGWBucketInfo& dest_bucket_info, rgw_obj& obj)
 {
   map<string, bufferlist> attrset;
   off_t ofs = 0;
@@ -3223,7 +3223,7 @@ int RGWRados::rewrite_obj(const string& bucket_owner, rgw_obj& obj)
     return ret;
   }
 
-  return copy_obj_data((void *)&rctx, bucket_owner, &handle, end, obj, obj, max_chunk_size, NULL, mtime, attrset, RGW_OBJ_CATEGORY_MAIN, NULL, NULL, NULL);
+  return copy_obj_data((void *)&rctx, dest_bucket_info, &handle, end, obj, obj, max_chunk_size, NULL, mtime, attrset, RGW_OBJ_CATEGORY_MAIN, NULL, NULL, NULL);
 }
 
 /**
@@ -3452,7 +3452,8 @@ set_err_state:
   }
 
   if (copy_data) { /* refcounting tail wouldn't work here, just copy the data */
-    return copy_obj_data(ctx, dest_bucket_info.owner, &handle, end, dest_obj, src_obj, max_chunk_size, mtime, 0, src_attrs, category, ptag, petag, err);
+    return copy_obj_data(ctx, dest_bucket_info, &handle, end, dest_obj, src_obj,
+                         max_chunk_size, mtime, 0, src_attrs, category, ptag, petag, err);
   }
 
   RGWObjManifest::obj_iterator miter = astate->manifest.obj_begin();
@@ -3566,7 +3567,7 @@ done_ret:
 
 
 int RGWRados::copy_obj_data(void *ctx,
-               const string& owner,
+               RGWBucketInfo& dest_bucket_info,
               void **handle, off_t end,
                rgw_obj& dest_obj,
                rgw_obj& src_obj,
@@ -3585,8 +3586,8 @@ int RGWRados::copy_obj_data(void *ctx,
   string tag;
   append_rand_alpha(cct, tag, tag, 32);
 
-  RGWPutObjProcessor_Atomic processor(owner, dest_obj.bucket, dest_obj.get_object(),
-                                      cct->_conf->rgw_obj_stripe_size, tag);
+  RGWPutObjProcessor_Atomic processor(dest_bucket_info.owner, dest_obj.bucket, dest_obj.get_object(),
+                                      cct->_conf->rgw_obj_stripe_size, tag, dest_bucket_info.versioning_enabled);
   int ret = processor.prepare(this, ctx, NULL);
   if (ret < 0)
     return ret;
index e6c12d21ff8301741e6dd06a55ff86db8dbfe537..a168109a73cebc9f875f289124ec55e2b1539a94 100644 (file)
@@ -314,7 +314,7 @@ public:
       if (objs.size() == 1) {
         map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
         rgw_obj& obj = iter->second.loc;
-        return head_obj.object != obj.object;
+        return !(head_obj == obj);
       }
       return (objs.size() >= 2);
     }
@@ -1617,7 +1617,7 @@ public:
     return clone_objs(ctx, dst_obj, v, attrs, category, pmtime, truncate_dest, exclusive, xattr_cond);
   }
 
-  int rewrite_obj(const string& bucket_owner, rgw_obj& obj);
+  int rewrite_obj(RGWBucketInfo& dest_bucket_info, rgw_obj& obj);
   /**
    * Copy an object.
    * dest_obj: the object to copy into
@@ -1651,7 +1651,7 @@ public:
                void *progress_data);
 
   int copy_obj_data(void *ctx,
-               const string& owner,
+               RGWBucketInfo& dest_bucket_info,
               void **handle, off_t end,
                rgw_obj& dest_obj,
                rgw_obj& src_obj,