]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove repop_map in osd 7077/head
authorXinze Chi <xinze@xsky.com>
Tue, 29 Dec 2015 14:48:55 +0000 (22:48 +0800)
committerXinze Chi <xinze@xsky.com>
Tue, 29 Dec 2015 14:48:55 +0000 (22:48 +0800)
If I do not misread, repop_map is useless.

Signed-off-by: Xinze Chi <xinze@xsky.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index c98a468fad60bc3da628227337d1995b21a2a4ee..1f958925cbff40679eabfabdbe8d383bb499c3ac 100644 (file)
@@ -1365,7 +1365,6 @@ ReplicatedPG::ReplicatedPG(OSDService *o, OSDMapRef curmap,
     pgbackend->get_is_readable_predicate(),
     pgbackend->get_is_recoverable_predicate());
   snap_trimmer_machine.initiate();
-  repop_map.rehash(g_conf->osd_client_message_cap/_pool.info.get_pg_num() * g_conf->osd_pg_op_threshold_ratio);
 }
 
 void ReplicatedPG::get_src_oloc(const object_t& oid, const object_locator_t& oloc, object_locator_t& src_oloc)
@@ -8354,7 +8353,6 @@ ReplicatedPG::RepGather *ReplicatedPG::new_repop(OpContext *ctx, ObjectContextRe
   repop->start = ceph_clock_now(cct);
 
   repop_queue.push_back(&repop->queue_item);
-  repop_map[repop->rep_tid] = repop;
   repop->get();
 
   osd->logger->inc(l_osd_op_wip);
@@ -8373,7 +8371,6 @@ void ReplicatedPG::remove_repop(RepGather *repop)
     dout(20) << " snapset_obc " << *repop->ctx->snapset_obc << dendl;
   release_op_ctx_locks(repop->ctx);
   repop->ctx->finish(0);  // FIXME: return value here is sloppy
-  repop_map.erase(repop->rep_tid);
   repop->put();
 
   osd->logger->dec(l_osd_op_wip);
@@ -9545,7 +9542,6 @@ void ReplicatedPG::apply_and_flush_repops(bool requeue)
     remove_repop(repop);
   }
 
-  assert(repop_map.empty());
   assert(repop_queue.empty());
 
   if (requeue) {
index a52144535beb1aa955fcde2f4218f87c99c02bcc..da7c463f331253b7d25558fb46fda4b17361e1f1 100644 (file)
@@ -887,7 +887,6 @@ protected:
   // replica ops
   // [primary|tail]
   xlist<RepGather*> repop_queue;
-  ceph::unordered_map<ceph_tid_t, RepGather*> repop_map;
 
   friend class C_OSD_RepopApplied;
   friend class C_OSD_RepopCommit;