freebsd-nq/sys/cddl
Konstantin Belousov fdc6b10d44 Add a VN_OPEN_INVFS flag.
vn_open_cred() assumes that it is called from the top-level of a VFS
syscall.  Writers must call bwillwrite() before locking any VFS
resource to wait for cleanup of dirty buffers.

ZFS getextattr() and setextattr() VOPs do call vn_open_cred(), which
results in wait for unrelated buffers while owning ZFS vnode lock (and
ZFS does not use buffer cache).  VN_OPEN_INVFS allows caller to skip
bwillwrite.

Note that ZFS is still incorrect there, because it starts write on an
mp and locks a vnode while holding another vnode lock.

Reported by:	Willem Jan Withagen <wjw@digiware.nl>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2019-11-29 14:02:32 +00:00
..
boot/zfs loader: factor out label and uberblock load from vdev_probe, add MMP checks 2019-11-03 21:19:52 +00:00
compat/opensolaris fix up r354333, make zfsproc visible to dtrace, rename to system_proc 2019-11-05 14:34:59 +00:00
contrib/opensolaris Add a VN_OPEN_INVFS flag. 2019-11-29 14:02:32 +00:00
dev dtrace: 64-bits registers support 2019-10-04 16:17:00 +00:00