From 33c6e230a24f14abb610283cb69a7f5a3954c119 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 7 Nov 2010 07:45:52 -0800 Subject: [PATCH] mds: do not scatter_writebehind in MIX state Replicas might come in while we're flushing and get a MIX state with the old state. Signed-off-by: Sage Weil --- src/mds/Locker.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 6688e38fa9c50..f227922a989df 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -3393,6 +3393,11 @@ void Locker::scatter_nudge(ScatterLock *lock, Context *c, bool forcelockchange) // can we do it now? // (only if we're not replicated.. if we are, we really do need // to nudge the lock state!) + /* + actually, even if we're not replicated, we can't stay in MIX, because another mds + could discover and replicate us at any time. if that happens while we're flushing, + they end up in MIX but their inode has the old scatterstat version. + if (!forcelockchange && !lock->get_parent()->is_replicated() && lock->can_wrlock(-1)) { dout(10) << "scatter_nudge auth, propagating " << *lock << " on " << *p << dendl; scatter_writebehind(lock); @@ -3400,6 +3405,7 @@ void Locker::scatter_nudge(ScatterLock *lock, Context *c, bool forcelockchange) lock->add_waiter(SimpleLock::WAIT_STABLE, c); return; } + */ // adjust lock state dout(10) << "scatter_nudge auth, scatter/unscattering " << *lock << " on " << *p << dendl; -- 2.39.5