HomeFreeBSD

vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated

Description

vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated

PR#293198 reports a hang within ZFS when exports
are being updated concurrently with a VOP_SETEXTATTR().
The hang appears to be caused by mishandling of the
z_teardown_lock, but fixing handling of this lock appears
to be a major effort. Since the hang occurs when
VFS_MOUNT() acquires a write/exclusive z_teardown_lock,
which rarely occurs, except when exports are being updated,
this patch avoids the VFS_MOUNT() call for this case.

Avoiding a VFS_MOUNT() call fixes the hang for the case
reported by PR#293198 and is also an optimization.
As such, this patch avoids the VFS_MOUNT() call when only exports
are being updated similar to what was already being done
within vnet prisons.

PR: 293198
Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55318

Details

Provenance
rmacklemAuthored on Feb 17 2026, 10:57 PM
Reviewer
kib
Differential Revision
D55318: vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated
Parents
rGbc6c827078b7: OptionalObsoleteFiles: Add figpar to dialog section
Branches
Unknown
Tags
Unknown