]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not scatter_writebehind on nudge if replicated
authorSage Weil <sage@newdream.net>
Thu, 23 Sep 2010 04:10:18 +0000 (21:10 -0700)
committerSage Weil <sage@newdream.net>
Thu, 23 Sep 2010 23:44:47 +0000 (16:44 -0700)
This can cause the inode rstat etc to become out of sync with dirfrag
accounted_rstat when the scatterlock is not in a gathered state: the
local values will get updated but those on other nodes will not, and the
inode will drift out of sync with the dirfrags.

Other callers to scatter_writebehind() are all in contexts where we have
_just_ gathered dirfrag state, or there is no remote dirfrag state to
gather.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/Locker.cc

index 4203aefc50a9de1faf289b67e45713e59bf036dd..be67688cd725d433932a26410f9ea54e94f3a88d 100644 (file)
@@ -3292,7 +3292,7 @@ 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!)
-       if (!forcelockchange && lock->can_wrlock(-1)) {
+       if (!forcelockchange && !lock->get_parent()->is_replicated() && lock->can_wrlock(-1)) {
          dout(10) << "scatter_nudge auth, propagating " << *lock << " on " << *p << dendl;
          scatter_writebehind(lock);
          if (c)