From e0b75a2997be9c18055ea8264e5f8add7e008605 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 24 Apr 2008 10:45:42 -0700 Subject: [PATCH] objecter: fix tid handling so that we want for ack AND commit --- src/osdc/Objecter.cc | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index dbda9665eb1f4..4591c40806980 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -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; -- 2.39.5