HomeFreeBSD

VFS: update VOP_FSYNC() debug check to reflect actual locking policy

Description

VFS: update VOP_FSYNC() debug check to reflect actual locking policy

Shared vs. exclusive locking is determined not by MNT_EXTENDED_SHARED
but by MNT_SHARED_WRITES (although there are several places that
ignore this and simply always use an exclusive lock). Also add a
comment on the possible difference between VOP_GETWRITEMOUNT(vp)
and vp->v_mount on this path.

Found by local testing of unionfs atop ZFS with DEBUG_VFS_LOCKS.

MFC after: 2 weeks
Reviewed by: kib, olce
Differential Revision: https://reviews.freebsd.org/D43816

Details

Provenance
jahAuthored on Dec 26 2023, 2:02 AM
Reviewer
kib
Differential Revision
D43816: VFS: update VOP_FSYNC() debug check to reflect actual locking policy
Parents
rGcc3ec9f75978: unionfs: cache upper/lower mount objects
Branches
Unknown
Tags
Unknown