]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: fix tid handling so that we want for ack AND commit
authorSage Weil <sage@newdream.net>
Thu, 24 Apr 2008 17:45:42 +0000 (10:45 -0700)
committerSage Weil <sage@newdream.net>
Thu, 24 Apr 2008 17:45:42 +0000 (10:45 -0700)
src/osdc/Objecter.cc

index dbda9665eb1f4cf66973933c8d2291a10cf17f1f..4591c4080698083007983bcf10c388a1a78201ce 100644 (file)
@@ -962,15 +962,20 @@ void Objecter::handle_osd_modify_reply(MOSDOpReply *m)
 
   // done?
  done:
-  // remove from tid/osd maps
-  assert(pg.active_tids.count(tid));
-  pg.active_tids.erase(tid);
-  dout(15) << "handle_osd_modify_reply pg " << m->get_pg()
-          << " still has " << pg.active_tids << dendl;
-  if (pg.active_tids.empty()) 
-    close_pg( m->get_pg() );
-  op_modify.erase( tid );
 
+  // done with this tid?
+  if (wr->waitfor_commit.count(tid) == 0 &&
+      wr->waitfor_ack.count(tid) == 0) {
+    assert(pg.active_tids.count(tid));
+    pg.active_tids.erase(tid);
+    dout(15) << "handle_osd_modify_reply pg " << m->get_pg()
+            << " still has " << pg.active_tids << dendl;
+    if (pg.active_tids.empty()) 
+      close_pg( m->get_pg() );
+    op_modify.erase( tid );
+  }
+  
+  // done with this overall op?
   if (wr->onack == 0 && wr->oncommit == 0) {
     dout(15) << "handle_osd_modify_reply completed" << dendl;
     delete wr;