]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::peer: count/find cleanup
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Wed, 3 Nov 2010 00:38:16 +0000 (17:38 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Wed, 10 Nov 2010 19:46:17 +0000 (11:46 -0800)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/osd/PG.cc

index 7ca514b81ce74f10104e729d0b32ec435c248f4b..7bcdb48e7833e108c5154756909acd540855a550 100644 (file)
@@ -1345,7 +1345,7 @@ void PG::peer(ObjectStore::Transaction& t, list<Context*>& tfin,
 
     if (pi.is_empty())
       continue;
-    if (peer_missing.count(peer) == 0) {
+    if (peer_missing.find(peer) == peer_missing.end()) {
       if (pi.last_update == pi.last_complete) {
        dout(10) << " infering no missing (last_update==last_complete) for osd" << peer << dendl;
        peer_missing[peer].num_missing();  // just create the entry.
@@ -1354,8 +1354,10 @@ void PG::peer(ObjectStore::Transaction& t, list<Context*>& tfin,
        have_all_missing = false;
       }
     }
-    if (peer_log_requested.count(peer) ||
-        peer_summary_requested.count(peer)) continue;
+    if (peer_log_requested.find(peer) != peer_log_requested.end())
+      continue;
+    if (peer_summary_requested.find(peer) != peer_summary_requested.end())
+      continue;
    
     assert(pi.last_update <= log.head);