From: Greg Farnum Date: Fri, 29 Aug 2014 06:25:42 +0000 (-0700) Subject: MDCache: handle internal ops in respond_to_request() X-Git-Tag: v0.89~50^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=063cd2fca5e84e15ccbe1c44649177fbb87ae324;p=ceph.git MDCache: handle internal ops in respond_to_request() This only works for those which have specified a finisher in the MDR. Signed-off-by: Greg Farnum --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 315d036a7ac6..a747959d82e0 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -903,7 +903,14 @@ void Server::submit_mdlog_entry(LogEvent *le, MDSInternalContextBase *fin, MDReq */ void Server::respond_to_request(MDRequestRef& mdr, int r) { - reply_client_request(mdr, new MClientReply(mdr->client_request, r)); + if (mdr->client_request) { + reply_client_request(mdr, new MClientReply(mdr->client_request, r)); + } else if (mdr->internal_op > -1) { + dout(10) << "respond_to_request on internal request " << mdr << dendl; + if (!mdr->internal_op_finish) + assert(0 == "trying to respond to internal op without finisher"); + mdr->internal_op_finish->complete(r); + } } void Server::early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn)