From 9bfe540c659e2fcec34aa0a4b981e52f96b14f22 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 19 Nov 2012 10:43:40 +0800 Subject: [PATCH] mds: don't forward client request from MDS Forwarding client request that was from MDS will trigger assertion in MDS::forward_message_mds(). MDS only send client requests for stray migration/reintegration, so it's safe to drop them. Signed-off-by: Yan, Zheng --- src/mds/MDCache.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 5f0ba16defdbc..399156ec83775 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -7476,13 +7476,17 @@ void MDCache::request_finish(MDRequest *mdr) void MDCache::request_forward(MDRequest *mdr, int who, int port) { - dout(7) << "request_forward " << *mdr << " to mds." << who << " req " << *mdr << dendl; - - mds->forward_message_mds(mdr->client_request, who); - mdr->client_request = 0; + if (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_fw); + } else { + dout(7) << "request_forward drop " << *mdr << " req " << *mdr->client_request + << " was from mds" << dendl; + } request_cleanup(mdr); - - if (mds->logger) mds->logger->inc(l_mds_fw); } -- 2.39.5