]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: avoid scatter writebehind from predirty_*
authorSage Weil <sage@newdream.net>
Thu, 3 Dec 2009 23:16:08 +0000 (15:16 -0800)
committerSage Weil <sage@newdream.net>
Fri, 4 Dec 2009 00:27:06 +0000 (16:27 -0800)
predirty_journal_parents does wrlock_start with
nowait=true.  Make sure we don't then simple_lock if
lock->is_updated(), as that will call scatter_writebehind,
which will barf if a log event is currently open (which
it is in this case).

src/mds/Locker.cc

index b3f29089f19aa7feae9b479f3f0414fea655d4b2..9f31eb461f414b0a4b4052ce332571b162ed0488 100644 (file)
@@ -813,8 +813,11 @@ bool Locker::wrlock_start(SimpleLock *lock, MDRequest *mut, bool nowait)
     if (in->is_auth()) {
       if (want_scatter)
        file_mixed((ScatterLock*)lock);
-      else 
+      else {
+       if (nowait && lock->is_updated())
+         return false;   // don't do nested lock, as that may scatter_writebehind in simple_lock!
        simple_lock(lock);
+      }
 
       if (nowait && !lock->can_wrlock(client))
        return false;