freebsd-skq/sys/cddl
Pawel Jakub Dawidek ad8294cf98 Before calling vflush(FORCECLOSE) mark file system as unmounted so the
following vnops will fail. This is very important, because without this change
vnode could be reclaimed at any point, even if we increased usecount. The only
way to ensure that vnode won't be reclaimed was to lock it, which would be very
hard to do in ZFS without changing a lot of code. With this change simply
increasing usecount is enough to be sure vnode won't be reclaimed from under
us. To be precise it can still be reclaimed but we won't be able to see it,
because every try to enter ZFS through VFS will result in EIO.

The only function that cannot return EIO, because it is needed for vflush() is
zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks
z_teardown_lock and never returns EIO.

MFC after:	3 days
2009-09-24 15:56:26 +00:00
..
boot/zfs Unexpand $FreeBSD$. 2009-05-23 16:01:58 +00:00
compat/opensolaris - Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular 2009-09-14 21:10:40 +00:00
contrib/opensolaris Before calling vflush(FORCECLOSE) mark file system as unmounted so the 2009-09-24 15:56:26 +00:00
dev dtrace_gethrtime: improve scaling of TSC ticks to nanoseconds 2009-07-15 17:07:39 +00:00