freebsd-dev/sys/contrib
Mateusz Guzik 829f0bcb5f vfs: add the concept of vnode state transitions
To quote from a comment above vput_final:
<quote>
* XXX Some filesystems pass in an exclusively locked vnode and strongly depend
* on the lock being held all the way until VOP_INACTIVE. This in particular
* happens with UFS which adds half-constructed vnodes to the hash, where they
* can be found by other code.
</quote>

As is there is no mechanism which allows filesystems to denote that a
vnode is fully initialized, consequently problems like the above are
only found the hard way(tm).

Add rudimentary support for state transitions, which in particular allow
to assert the vnode is not legally unlocked until its fate is decided
(either construction finishes or vgone is called to abort it).

The new field lands in a 1-byte hole, thus it does not grow the struct.

Bump __FreeBSD_version to 1400077

Reviewed by:	kib (previous version)
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D37759
2022-12-26 17:35:12 +00:00
..
alpine-hal
ck Merge commit 'ce929fe84f9c453263af379f3b255ff8eca01d48' 2021-10-29 19:18:03 +02:00
dev ath: Fix mismatches in array bounds. 2022-12-07 12:30:42 -08:00
device-tree Import device-tree files from Linux 6.0 2022-11-15 20:02:06 +01:00
dpdk_rte_lpm
edk2
ena-com ena: merge ena-com v2.5.0 upgrade 2022-01-23 20:27:13 +01:00
libb2
libfdt
libnv libnv: Mark a variable only used in a custom assertion as unused. 2022-04-13 16:08:19 -07:00
libsodium
ncsw dpaa: Remove unused variables. 2022-04-13 16:08:23 -07:00
ngatm ngatm: Expand #if 0 to cover all lines involving mlen. 2022-04-07 17:01:26 -07:00
openzfs vfs: add the concept of vnode state transitions 2022-12-26 17:35:12 +00:00
pcg-c/include
rdma/krping krping: Remove unused variable. 2022-04-07 17:01:28 -07:00
v4l
vchiq/interface vchiq: Remove unused devclass argument to DRIVER_MODULE. 2022-05-10 10:21:39 -07:00
x86emu Remove prototype of x86emu_init_default. 2022-02-27 15:11:17 -08:00
xen xen/acpi: upload Cx and Px data to Xen 2022-04-12 10:03:26 +02:00
xz-embedded MFV: xz-embedded 3f438e15109229bb14ab45f285f4bff5412a9542 2022-11-17 22:04:57 -08:00
zlib zlib crc32: Add prototypes for recently-added static functions. 2022-09-28 14:00:27 -07:00
zstd