]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: cleanup unused parameters in RGWRados::copy_obj_data 18917/head
authorEnming Zhang <enming.zhang@umcloud.com>
Tue, 14 Nov 2017 10:10:11 +0000 (18:10 +0800)
committerEnming Zhang <enming.zhang@umcloud.com>
Thu, 16 Nov 2017 03:34:09 +0000 (11:34 +0800)
src_obj, max_chunk_size, category and ptag are out
of use in RGWRados::copy_obj_data.

Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index 161608a89d987fc0ff1ce3215b03eb5b08588344..07e97fdb050f0e1d9821b487756516e943d75569 100644 (file)
@@ -7377,16 +7377,8 @@ int RGWRados::rewrite_obj(RGWBucketInfo& dest_bucket_info, rgw_obj& obj)
   attrset.erase(RGW_ATTR_ID_TAG);
   attrset.erase(RGW_ATTR_TAIL_TAG);
 
-  uint64_t max_chunk_size;
-
-  ret = get_max_chunk_size(dest_bucket_info.placement_rule, obj, &max_chunk_size);
-  if (ret < 0) {
-    ldout(cct, 0) << "ERROR: failed to get max_chunk_size() for bucket " << obj.bucket << dendl;
-    return ret;
-  }
-
-  return copy_obj_data(rctx, dest_bucket_info, read_op, obj_size - 1, obj, obj, max_chunk_size, NULL, mtime, attrset,
-                       RGW_OBJ_CATEGORY_MAIN, 0, real_time(), NULL, NULL, NULL);
+  return copy_obj_data(rctx, dest_bucket_info, read_op, obj_size - 1, obj, NULL, mtime, attrset,
+                       0, real_time(), NULL, NULL);
 }
 
 struct obj_time_weight {
@@ -8035,9 +8027,9 @@ int RGWRados::copy_obj(RGWObjectCtx& obj_ctx,
   }
 
   if (copy_data) { /* refcounting tail wouldn't work here, just copy the data */
-    return copy_obj_data(obj_ctx, dest_bucket_info, read_op, obj_size - 1, dest_obj, src_obj,
-                         max_chunk_size, mtime, real_time(), attrs, category, olh_epoch, delete_at,
-                         version_id, ptag, petag);
+    return copy_obj_data(obj_ctx, dest_bucket_info, read_op, obj_size - 1, dest_obj,
+                         mtime, real_time(), attrs, olh_epoch, delete_at,
+                         version_id, petag);
   }
 
   RGWObjManifest::obj_iterator miter = astate->manifest.obj_begin();
@@ -8161,16 +8153,12 @@ int RGWRados::copy_obj_data(RGWObjectCtx& obj_ctx,
                RGWBucketInfo& dest_bucket_info,
               RGWRados::Object::Read& read_op, off_t end,
                rgw_obj& dest_obj,
-               rgw_obj& src_obj,
-               uint64_t max_chunk_size,
               real_time *mtime,
               real_time set_mtime,
                map<string, bufferlist>& attrs,
-               RGWObjCategory category,
                uint64_t olh_epoch,
               real_time delete_at,
                string *version_id,
-               string *ptag,
                ceph::buffer::list *petag)
 {
   string tag;
index d18398eba4d0bf5f184ef4ee1b62c90e3a92b4e0..5942ec013dd1994952c317a3ab705a97e1098a42 100644 (file)
@@ -3181,16 +3181,12 @@ public:
                RGWBucketInfo& dest_bucket_info,
               RGWRados::Object::Read& read_op, off_t end,
                rgw_obj& dest_obj,
-               rgw_obj& src_obj,
-               uint64_t max_chunk_size,
               ceph::real_time *mtime,
               ceph::real_time set_mtime,
                map<string, bufferlist>& attrs,
-               RGWObjCategory category,
                uint64_t olh_epoch,
               ceph::real_time delete_at,
                string *version_id,
-               string *ptag,
                ceph::buffer::list *petag);
   
   int check_bucket_empty(RGWBucketInfo& bucket_info);