mds: allow handling slave request in the clientreplay stage

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>
This commit is contained in:
Yan, Zheng 2013-01-27 15:16:19 +08:00
parent e69e7e5d0e
commit abc4c78550

View File

@ -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));