]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix file_eval
authorSage Weil <sage@newdream.net>
Tue, 3 Mar 2009 23:20:27 +0000 (15:20 -0800)
committerSage Weil <sage@newdream.net>
Wed, 4 Mar 2009 00:35:52 +0000 (16:35 -0800)
Be more aggressive about shifting filelock state to something more
useful.  Mainly, do NOT stop everything if there are wrlocks!  This
causes all kinds of annoying stalls waiting for the log to flush.

src/mds/Locker.cc

index 2ada52470af6cdc127bb82adbb0285bbd65b88b6..5cc57ca70cf9f5e03feb32b3167f4fb59b7a65fa 100644 (file)
@@ -2991,7 +2991,6 @@ void Locker::file_eval(ScatterLock *lock)
   assert(lock->is_stable());
 
   if (lock->is_xlocked() || 
-      lock->is_wrlocked() || 
       lock->get_parent()->is_frozen()) return;
 
   if (lock->get_state() == LOCK_EXCL) {
@@ -3016,8 +3015,8 @@ void Locker::file_eval(ScatterLock *lock)
   
   // * -> loner?
   else if (lock->get_state() != LOCK_EXCL &&
-          !lock->is_rdlocked() &&
-          !lock->is_waiter_for(SimpleLock::WAIT_WR) &&
+          //!lock->is_rdlocked() &&
+          //!lock->is_waiter_for(SimpleLock::WAIT_WR) &&
           ((wanted & (CEPH_CAP_GWR|CEPH_CAP_GWRBUFFER)) || in->inode.is_dir()) &&
           in->try_choose_loner()) {
     dout(7) << "file_eval stable, bump to loner " << *lock
@@ -3027,8 +3026,8 @@ void Locker::file_eval(ScatterLock *lock)
 
   // * -> mixed?
   else if (lock->get_state() != LOCK_MIX &&
-          !lock->is_rdlocked() &&
-          !lock->is_waiter_for(SimpleLock::WAIT_WR) &&
+          //!lock->is_rdlocked() &&
+          //!lock->is_waiter_for(SimpleLock::WAIT_WR) &&
           (wanted & CEPH_CAP_GRD) &&
           (wanted & CEPH_CAP_GWR)) {
     dout(7) << "file_eval stable, bump to mixed " << *lock