summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-05-17 01:44:23 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-05-28 13:57:21 +0800
commita918e611e2d945a79de70730bd86da7636f6cf11 (patch)
tree8ad76429a9484e0565b7a8181c864c98464d9974
parent2b1b6cae2de541ad18d51dd1005e71c08336aba5 (diff)
downloadceph-a918e611e2d945a79de70730bd86da7636f6cf11.tar.gz
mds: fix Locker::request_inode_file_caps()
After sending cache rejoin message, replica need notify auth MDS when cap_wanted changes. But it can send MInodeFileCaps message only after receiving auth MDS' rejoin ack. Locker::request_inode_file_caps() has correct wait logical, but it skips sending MInodeFileCaps message if the auth MDS is still in rejoin state. The fix is defer sending MInodeFileCaps message until the auth MDS is active. It makes the function's wait logical less tricky. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r--src/mds/Locker.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index 781704c86f8..7e3e9fd8895 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -1932,8 +1932,7 @@ void Locker::request_inode_file_caps(CInode *in)
}
int auth = in->authority().first;
- if (in->is_rejoining() &&
- mds->mdsmap->get_state(auth) == MDSMap::STATE_REJOIN) {
+ if (mds->mdsmap->get_state(auth) == MDSMap::STATE_REJOIN) {
mds->wait_for_active_peer(auth, new C_MDL_RequestInodeFileCaps(this, in));
return;
}
@@ -1954,7 +1953,7 @@ void Locker::request_inode_file_caps(CInode *in)
void Locker::handle_inode_file_caps(MInodeFileCaps *m)
{
// nobody should be talking to us during recovery.
- assert(mds->is_rejoin() || mds->is_clientreplay() || mds->is_active() || mds->is_stopping());
+ assert(mds->is_clientreplay() || mds->is_active() || mds->is_stopping());
// ok
CInode *in = mdcache->get_inode(m->get_ino());