From: Greg Farnum Date: Wed, 27 Aug 2014 21:11:26 +0000 (-0700) Subject: MDCache: "handle" request_forward on internal ops X-Git-Tag: v0.89~50^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=391740215d2c1de032fb4b6e6fd1aa94e30593fc;p=ceph.git MDCache: "handle" request_forward on internal ops For now, just return -EXDEV ("Cross-device link") on internal ops that require forwarding, as forwarding internal ops will require a great deal more infrastructure.. But push the issue down to this level instead of worrying about it in path_traverse, and consider the possibility that the MDRequest might not have a client_request that it's wrapped around. Signed-off-by: Greg Farnum --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index c52a90b8b3a..0d44e36678c 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -8447,12 +8447,15 @@ void MDCache::request_finish(MDRequestRef& mdr) void MDCache::request_forward(MDRequestRef& mdr, int who, int port) { mdr->mark_event("forwarding request"); - if (mdr->client_request->get_source().is_client()) { + if (mdr->client_request && mdr->client_request->get_source().is_client()) { dout(7) << "request_forward " << *mdr << " to mds." << who << " req " << *mdr->client_request << dendl; mds->forward_message_mds(mdr->client_request, who); mdr->client_request = 0; if (mds->logger) mds->logger->inc(l_mds_forward); + } else if (mdr->internal_op >= 0) { + dout(10) << "request_forward on internal op; cancelling" << dendl; + mdr->internal_op_finish->complete(-EXDEV); } else { dout(7) << "request_forward drop " << *mdr << " req " << *mdr->client_request << " was from mds" << dendl;