From 2011b3b16b2598ee173852e6f7ea2094b3f43b2f Mon Sep 17 00:00:00 2001 From: sageweil Date: Fri, 28 Sep 2007 21:05:48 +0000 Subject: [PATCH] use hash_map in osd for rep ops git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1857 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/osd/ReplicatedPG.cc | 10 +++------- trunk/ceph/osd/ReplicatedPG.h | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/trunk/ceph/osd/ReplicatedPG.cc b/trunk/ceph/osd/ReplicatedPG.cc index 9801a13d5da9d..7b5bdf581d643 100644 --- a/trunk/ceph/osd/ReplicatedPG.cc +++ b/trunk/ceph/osd/ReplicatedPG.cc @@ -886,16 +886,12 @@ void ReplicatedPG::put_rep_gather(RepGather *repop) } dout(10) << "put_repop deleting " << *repop << dendl; - //repop->lock.Unlock(); assert(rep_gather.count(repop->rep_tid)); rep_gather.erase(repop->rep_tid); delete repop->op; delete repop; - - } else { - //repop->lock.Unlock(); } } @@ -1659,7 +1655,7 @@ void ReplicatedPG::note_failed_osd(int o) dout(10) << "note_failed_osd " << o << dendl; // do async; repop_ack() may modify pg->repop_gather list ls; - for (map::iterator p = rep_gather.begin(); + for (hash_map::iterator p = rep_gather.begin(); p != rep_gather.end(); p++) { //dout(-1) << "checking repop tid " << p->first << dendl; @@ -1685,7 +1681,7 @@ void ReplicatedPG::on_acker_change() } else { // for splay or chain replication, any change is significant. // apply repops - for (map::iterator p = rep_gather.begin(); + for (hash_map::iterator p = rep_gather.begin(); p != rep_gather.end(); p++) { if (!p->second->applied) @@ -1696,7 +1692,7 @@ void ReplicatedPG::on_acker_change() rep_gather.clear(); // and repop waiters - for (map >::iterator p = waiting_for_repop.begin(); + for (hash_map >::iterator p = waiting_for_repop.begin(); p != waiting_for_repop.end(); p++) for (list::iterator pm = p->second.begin(); diff --git a/trunk/ceph/osd/ReplicatedPG.h b/trunk/ceph/osd/ReplicatedPG.h index 2680fa217d477..ab44026b43fb2 100644 --- a/trunk/ceph/osd/ReplicatedPG.h +++ b/trunk/ceph/osd/ReplicatedPG.h @@ -69,8 +69,8 @@ public: protected: // replica ops // [primary|tail] - map rep_gather; - map > waiting_for_repop; + hash_map rep_gather; + hash_map > waiting_for_repop; // load balancing set balancing_reads; -- 2.39.5