]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: small cleanup
authorSage Weil <sage@newdream.net>
Thu, 31 Jul 2008 18:26:20 +0000 (11:26 -0700)
committerSage Weil <sage@newdream.net>
Thu, 31 Jul 2008 18:26:20 +0000 (11:26 -0700)
src/osd/ReplicatedPG.cc

index fd96397a17c0db7157f0b1bd5ce7c46343d4e7e1..2a83cd74014c749b15751d42e7fa84e266111296 100644 (file)
@@ -1566,23 +1566,15 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op)
 
 
 
-  // am i primary?  are others missing this too?
   if (is_primary()) {
+    // are others missing this too?
     for (unsigned i=1; i<acting.size(); i++) {
       int peer = acting[i];
       assert(peer_missing.count(peer));
       if (peer_missing[peer].is_missing(poid.oid)) 
        push(poid, peer);  // ok, push it, and they (will) have it now.
     }
-  }
-
-  // kick waiters
-  if (waiting_for_missing_object.count(poid.oid)) {
-    osd->take_waiters(waiting_for_missing_object[poid.oid]);
-    waiting_for_missing_object.erase(poid.oid);
-  }
 
-  if (is_primary()) {
     // continue recovery
     if (info.is_uptodate())
       uptodate_set.insert(osd->get_nodeid());
@@ -1594,6 +1586,12 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op)
   }
 
   delete op;
+
+  // kick waiters
+  if (waiting_for_missing_object.count(poid.oid)) {
+    osd->take_waiters(waiting_for_missing_object[poid.oid]);
+    waiting_for_missing_object.erase(poid.oid);
+  }
 }