From a2c761e62acdb3cff941867c224ae295cf6337b3 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 22 Jul 2011 11:33:16 -0700 Subject: [PATCH] mds: Only change in->replica_caps_wanted when actually messaging Also, only send the message if the auth is past the REJOIN state. The auth will just drop it if it gets this request while in rejoin. Signed-off-by: Greg Farnum --- src/mds/Locker.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 4692a44600298..b53370fb3d689 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -1768,11 +1768,12 @@ void Locker::request_inode_file_caps(CInode *in) << " on " << *in << " to mds" << auth << dendl; assert(!in->is_auth()); - in->replica_caps_wanted = wanted; - if (mds->mdsmap->get_state(auth) >= MDSMap::STATE_REJOIN) + if (mds->mdsmap->get_state(auth) > MDSMap::STATE_REJOIN) { mds->send_message_mds(new MInodeFileCaps(in->ino(), in->replica_caps_wanted), auth); + in->replica_caps_wanted = wanted; + } } else { in->replica_caps_wanted_keep_until.sec_ref() = 0; } -- 2.39.5