]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Only change in->replica_caps_wanted when actually messaging
authorGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 22 Jul 2011 18:33:16 +0000 (11:33 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 22 Jul 2011 18:36:46 +0000 (11:36 -0700)
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 <gregory.farnum@dreamhost.com>
src/mds/Locker.cc

index 4692a44600298657fa207e5eae9ffc190e049198..b53370fb3d6899ee3de39587bb0de5f5181086bd 100644 (file)
@@ -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;
   }