freebsd-dev/sys/cddl/contrib/opensolaris/uts/common/fs
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
..
zfs Before calling vflush(FORCECLOSE) mark file system as unmounted so the 2009-09-24 15:56:26 +00:00
gfs.c work around snapshot shutdown race reported by Henri Hennebert 2009-05-30 19:26:35 +00:00
vnode.c Manage asynchronous vnode release just like Solaris. 2009-08-17 09:48:34 +00:00