Date: Thu, 24 Sep 2009 15:56:26 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_vfsops.c src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys zfs_znode.h Message-ID: <200909241556.n8OFud0D043631@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
pjd 2009-09-24 15:56:26 UTC FreeBSD src repository Modified files: sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_vfsops.c sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys zfs_znode.h Log: SVN rev 197459 on 2009-09-24 15:56:26Z by pjd 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 Revision Changes Path 1.7 +4 -0 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h 1.32 +12 -1 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909241556.n8OFud0D043631>