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>
// 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)