Invalidate dcache and inode cache

When performing a 'zfs rollback' it's critical to invalidate
the previous dcache and inode cache.  If we don't there will
stale cache entries which when accessed will result in EIOs.
This commit is contained in:
Brian Behlendorf 2011-02-04 16:54:34 -08:00
parent b3b4f547f9
commit ceb43b935d
1 changed files with 7 additions and 7 deletions

View File

@ -1071,17 +1071,17 @@ zfsvfs_teardown(zfs_sb_t *zsb, boolean_t unmounting)
rrw_enter(&zsb->z_teardown_lock, RW_WRITER, FTAG); rrw_enter(&zsb->z_teardown_lock, RW_WRITER, FTAG);
#ifdef HAVE_DNLC
if (!unmounting) { if (!unmounting) {
/* /*
* We purge the parent filesystem's vfsp as the parent * We purge the parent filesystem's super block as the
* filesystem and all of its snapshots have their vnode's * parent filesystem and all of its snapshots have their
* v_vfsp set to the parent's filesystem's vfsp. Note, * inode's super block set to the parent's filesystem's
* 'z_parent' is self referential for non-snapshots. * super block. Note, 'z_parent' is self referential
* for non-snapshots.
*/ */
(void) dnlc_purge_vfsp(zsb->z_parent->z_vfs, 0); shrink_dcache_sb(zsb->z_parent->z_sb);
invalidate_inodes(zsb->z_parent->z_sb);
} }
#endif /* HAVE_DNLC */
/* /*
* Close the zil. NB: Can't close the zil while zfs_inactive * Close the zil. NB: Can't close the zil while zfs_inactive