diff options
author | Brian Behlendorf <[email protected]> | 2011-02-04 16:54:34 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-02-10 09:27:22 -0800 |
commit | ceb43b935d6c4f4f6509623c7498d5dcc40ea813 (patch) | |
tree | 6c58f52e31e0e8c9a8d88737e9faa5a4343f89f3 /module/zfs/zfs_vfsops.c | |
parent | b3b4f547f9243c0c1a446c74574a1f737e29dee6 (diff) |
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.
Diffstat (limited to 'module/zfs/zfs_vfsops.c')
-rw-r--r-- | module/zfs/zfs_vfsops.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 1763d171a..bb2fdb029 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -1071,17 +1071,17 @@ zfsvfs_teardown(zfs_sb_t *zsb, boolean_t unmounting) rrw_enter(&zsb->z_teardown_lock, RW_WRITER, FTAG); -#ifdef HAVE_DNLC if (!unmounting) { /* - * We purge the parent filesystem's vfsp as the parent - * filesystem and all of its snapshots have their vnode's - * v_vfsp set to the parent's filesystem's vfsp. Note, - * 'z_parent' is self referential for non-snapshots. + * We purge the parent filesystem's super block as the + * parent filesystem and all of its snapshots have their + * inode's super block set to the parent's filesystem's + * 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 |