Note that this will let the parent nestlock 'dirty' state get out of
sync with the lock state, as the whole point of the dirty rstat lists is
that it can happen any time. It does, however, queue us up.
state_set(STATE_DIRTYRSTAT);
get(PIN_DIRTYRSTAT);
CDentry *dn = get_projected_parent_dn();
- dn->dir->dirty_rstat_inodes.push_back(&dirty_rstat_item);
+ CDir *pdir = dn->dir;
+ pdir->dirty_rstat_inodes.push_back(&dirty_rstat_item);
+
+ mdcache->mds->locker->mark_updated_scatterlock(&pdir->inode->nestlock);
}
}
void CInode::clear_dirty_rstat()
dout(20) << " unwritable parent nestlock " << parent->inode->nestlock
<< ", marking dirty rstat on " << *cur << dendl;
cur->mark_dirty_rstat();
- mds->locker->mark_updated_scatterlock(&parent->inode->nestlock);
} else {
SnapRealm *prealm = parent->inode->find_snaprealm();