freebsd-dev/sys/fs/unionfs
Jason A. Harmening 93fe61afde unionfs_mkdir(): handle dvp reclamation
The underlying VOP_MKDIR() implementation may temporarily drop the
parent directory vnode's lock.  If the vnode is reclaimed during that
window, the unionfs vnode will effectively become unlocked because
the its v_vnlock field will be reset.  To uphold the locking
requirements of VOP_MKDIR() and to avoid triggering various VFS
assertions, explicitly re-lock the unionfs vnode before returning
in this case.

Note that there are almost certainly other cases in which we'll
similarly need to handle vnode relocking by the underlying FS; this
is the only one that's caused problems in stress testing so far.
A more general solution, such as that employed for nullfs in
null_bypass(), will likely need to be implemented.

Tested by:	pho
Reviewed by:	kib, markj
Differential Revision: https://reviews.freebsd.org/D39272
2023-04-17 20:31:40 -05:00
..
union_subr.c vn_lock_pair(): allow to request shared locking 2023-04-08 01:58:26 +03:00
union_vfsops.c unionfs: allow recursion on covered vnode lock during mount/unmount 2022-12-10 22:02:38 -06:00
union_vnops.c unionfs_mkdir(): handle dvp reclamation 2023-04-17 20:31:40 -05:00
union.h Remove unnecessary thread argument from unionfs_nodeget() and _noderem() 2021-12-07 16:20:02 -08:00