]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: remove unnecessary argument in finish_set_dedup
authormyoungwon oh <ohmyoungwon@gmail.com>
Sat, 31 Oct 2020 06:56:45 +0000 (15:56 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Sat, 31 Oct 2020 06:56:45 +0000 (15:56 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index dffb3948527b5b3f7bd672779e2a927dbfdc215d..bf03127293a6406e7581c373d58277f7652d893f 100644 (file)
@@ -10017,7 +10017,7 @@ struct C_SetDedupChunks : public Context {
        // there are on-going works
        return;
       }
-      pg->finish_set_dedup(oid, it->second->chunks, r, tid);
+      pg->finish_set_dedup(oid, r, tid);
     } else {
       // if any failure occurs, put a mark on the results to recognize the failure
       it->second->results[0] = r;
@@ -10171,8 +10171,7 @@ hobject_t PrimaryLogPG::get_fpoid_from_chunk(const hobject_t soid, bufferlist& c
   return target;
 }
 
-void PrimaryLogPG::finish_set_dedup(hobject_t oid, map<hobject_t, pair<uint64_t, uint64_t>>& chunks,
-                                   int r, ceph_tid_t tid)
+void PrimaryLogPG::finish_set_dedup(hobject_t oid, int r, ceph_tid_t tid)
 {
   dout(10) << __func__ << " " << oid << " tid " << tid
           << " " << cpp_strerror(r) << dendl;
@@ -10196,7 +10195,7 @@ void PrimaryLogPG::finish_set_dedup(hobject_t oid, map<hobject_t, pair<uint64_t,
     return;
   }
 
-  if (chunks.size()) {
+  if (mop->chunks.size()) {
     OpContextUPtr ctx = simple_opc_create(obc);
     ceph_assert(ctx);
     if (ctx->lock_manager.get_lock_type(
@@ -10227,7 +10226,7 @@ void PrimaryLogPG::finish_set_dedup(hobject_t oid, map<hobject_t, pair<uint64_t,
     ctx->at_version = get_next_version();
     ctx->new_obs = obc->obs;
     ctx->new_obs.oi.clear_flag(object_info_t::FLAG_DIRTY);
-    for (auto p : chunks) {
+    for (auto p : mop->chunks) {
       struct chunk_info_t info;
       info.offset = 0;
       info.length = p.second.second;
index 7decb5704d327deff9b7938b1ce4034af3c4f318..9c8899a89b5a78077d834242dff7baa55979c06b 100644 (file)
@@ -1512,8 +1512,7 @@ protected:
   int do_cdc(const object_info_t& oi, bufferlist& bl, vector<pair<uint64_t, uint64_t>>& chunks);
   int start_dedup(OpRequestRef op, ObjectContextRef obc);
   hobject_t get_fpoid_from_chunk(const hobject_t soid, bufferlist& chunk);
-  void finish_set_dedup(hobject_t oid, map<hobject_t, pair<uint64_t, uint64_t>>& chunks,
-                       int r, ceph_tid_t tid);
+  void finish_set_dedup(hobject_t oid, int r, ceph_tid_t tid);
 
   friend struct C_ProxyChunkRead;
   friend class PromoteManifestCallback;