freebsd-nq/sys/cddl/contrib/opensolaris
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
..
common MFV r354382,r354385: 10601 10757 Pool allocation classes 2019-11-21 08:20:05 +00:00
uts Add a VN_OPEN_INVFS flag. 2019-11-29 14:02:32 +00:00
OPENSOLARIS.LICENSE