]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: flush log when waiting on xlock
authorSage Weil <sage@newdream.net>
Thu, 2 Apr 2009 21:59:13 +0000 (14:59 -0700)
committerSage Weil <sage@newdream.net>
Thu, 2 Apr 2009 21:59:13 +0000 (14:59 -0700)
src/mds/Locker.cc

index ef5939991c55023d0026f2b1153701cc938cfe08..d655b76b78d30bec7dd9a08aa3a6c5b9436ec3e1 100644 (file)
@@ -784,6 +784,11 @@ bool Locker::xlock_start(SimpleLock *lock, MDRequest *mut)
     }
     
     lock->add_waiter(SimpleLock::WAIT_WR|SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mut));
+
+    if (lock->get_parent()->is_auth() && (lock->is_wrlocked() ||  // as with cap flush
+                                         !lock->is_stable()))    // as with xlockdone
+      mds->mdlog->flush();
+
     return false;
   } else {
     // replica