]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: flush log on wrlock_start if lock isn't stable
authorSage Weil <sage@newdream.net>
Tue, 3 Mar 2009 00:30:10 +0000 (16:30 -0800)
committerSage Weil <sage@newdream.net>
Tue, 3 Mar 2009 00:38:15 +0000 (16:38 -0800)
src/mds/Locker.cc

index aa589a316d8c3e3b39ae8c473e8ae36dd7edd289..2ada52470af6cdc127bb82adbb0285bbd65b88b6 100644 (file)
@@ -698,7 +698,8 @@ bool Locker::wrlock_start(SimpleLock *lock, MDRequest *mut, bool nowait)
     lock->add_waiter(SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mut));
   
     // make sure we aren't waiting on a cap flush
-    if (lock->get_parent()->is_auth() && lock->is_wrlocked())
+    if (lock->get_parent()->is_auth() && (lock->is_wrlocked() ||  // as with cap flush
+                                         !lock->is_stable()))    // as with xlockdone
       mds->mdlog->flush();
   }