From 063cd2fca5e84e15ccbe1c44649177fbb87ae324 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Thu, 28 Aug 2014 23:25:42 -0700 Subject: [PATCH] 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 --- src/mds/Server.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 315d036a7ac6d..a747959d82e03 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) -- 2.39.5