From: Yehuda Sadeh Date: Wed, 28 May 2014 19:12:31 +0000 (-0700) Subject: objecter: don't serialize responses if there's no object name X-Git-Tag: v0.86~213^2~92 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e76cfcc6cf9db44e6fd286a9e2d5d8c2cff0900c;p=ceph.git objecter: don't serialize responses if there's no object name This implicitly fixes an issue with the list_objects() being reentrant, and triggers a lock dependency issue. The better solution would be to have the callback context specify whether it's reentrant or not, but will require a much bigger change. Signed-off-by: Yehuda Sadeh --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index ed364e43e87..ff151b05e65 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -2361,7 +2361,7 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m) } /* get it before we call _finish_op() */ - Mutex *completion_lock = s->get_lock(op->target.base_oid); + Mutex *completion_lock = (op->target.base_oid.name.size() ? s->get_lock(op->target.base_oid) : NULL); // done with this tid? if (!op->onack && !op->oncommit) { @@ -2372,8 +2372,9 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m) ldout(cct, 5) << num_unacked.read() << " unacked, " << num_uncommitted.read() << " uncommitted" << dendl; // serialize completions - - completion_lock->Lock(); + if (completion_lock) { + completion_lock->Lock(); + } s->lock.unlock(); // do callbacks @@ -2383,7 +2384,9 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m) if (oncommit) { oncommit->complete(rc); } - completion_lock->Unlock(); + if (completion_lock) { + completion_lock->Unlock(); + } m->put(); s->put();