HomeFreeBSD

unionfs: simplify writecount management

Description

unionfs: simplify writecount management

Use atomics to track the writecount granted to the underlying FS,
and avoid holding the vnode interlock while calling the underling FS'
VOP_ADD_WRITECOUNT(). This also fixes a WITNESS warning about nesting
the same lock type. Also add comments explaining why we need to track
the writecount on the unionfs vnode in the first place. Finally,
simplify writecount management to only use the upper vnode and assert
that we shouldn't have an active writecount on the lower vnode through
unionfs.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D33611

Details

Provenance
jahAuthored on Dec 21 2021, 11:49 PM
Reviewer
kib
Differential Revision
D33611: unionfs: simplify writecount management
Parents
rGca573c9a1779: sshd: update the libwrap patch to drop connections early
Branches
Unknown
Tags
Unknown