]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't change lock states on replicated inode
authorSage Weil <sage@newdream.net>
Tue, 1 Jun 2010 22:23:46 +0000 (15:23 -0700)
committerSage Weil <sage@newdream.net>
Tue, 1 Jun 2010 22:23:46 +0000 (15:23 -0700)
The reconnect will infer some client caps, which will affect what lock
states we want.  If we're not replicated, fine, just pick something good.
Otherwise, try_eval() and go through the proper channels.

This _might_ be the source of #165...

src/mds/MDCache.cc

index 14339f0d6ea6c34625439141c6dd9a0d915b1c34..676c91833330c74396b90c3b3b5bad1def51445a 100644 (file)
@@ -4101,8 +4101,12 @@ void MDCache::try_reconnect_cap(CInode *in, Session *session)
             << " on " << *in << dendl;
     remove_replay_cap_reconnect(in->ino(), client);
 
-    in->choose_lock_states();
-    dout(15) << " chose lock states on " << *in << dendl;
+    if (in->is_replicated()) {
+      mds->locker->try_eval(in, CEPH_CAP_LOCKS);
+    } else {
+      in->choose_lock_states();
+      dout(15) << " chose lock states on " << *in << dendl;
+    }
   }
 }