diff mbox

[4/6] mds: allow handling slave request in the clientreplay stage

Message ID 1359340106-24257-5-git-send-email-zheng.z.yan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan, Zheng Jan. 28, 2013, 2:28 a.m. UTC
From: "Yan, Zheng" <zheng.z.yan@intel.com>

replaying a client request may need to create slave request and the slave
MDS can be also in the clientreplay stage.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 src/mds/Server.cc | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index 083c287..520d389 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -101,6 +101,10 @@  void Server::dispatch(Message *m)
 		(m->get_type() == CEPH_MSG_CLIENT_REQUEST &&
 		 ((MClientRequest*)m)->is_replay()))) {
       // replaying!
+    } else if (mds->is_clientreplay() && m->get_type() == MSG_MDS_SLAVE_REQUEST &&
+	       (((MMDSSlaveRequest*)m)->is_reply() ||
+		!mds->mdsmap->is_active(m->get_source().num()))) {
+      // slave reply or the master is also in the clientreplay stage
     } else {
       dout(3) << "not active yet, waiting" << dendl;
       mds->wait_for_active(new C_MDS_RetryMessage(mds, m));