]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "mds: Only change in->replica_caps_wanted when actually messaging"
authorGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 22 Jul 2011 20:50:25 +0000 (13:50 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 22 Jul 2011 20:50:25 +0000 (13:50 -0700)
This reverts commit a2c761e62acdb3cff941867c224ae295cf6337b3. We actually
want to change this whenever we try to send a message, and we do want
to send messages during state REJOIN (the auth MDS will take the message if it's
appropriate to do so; otherwise it drops the message because the information
it contains is going to arrive anyway when we tell the MDS our entire
replicated state as part of its rejoin). Instead, we're going to fix when we
send messages so that it's not broken.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/Locker.cc

index b72d58e984e0a48ca4ffb3734474e7dfd23b1720..d657359a016aa97e4e156a2a132e0448a36309db 100644 (file)
@@ -1768,12 +1768,11 @@ 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;
   }