HomeFreeBSD

unionfs: cache upper/lower mount objects

Description

unionfs: cache upper/lower mount objects

Store the upper/lower FS mount objects in unionfs per-mount data and
use these instead of the v_mount field of the upper/lower root
vnodes. As described in the referenced PR, it is unsafe to access this
field on the unionfs unmount path as ZFS rollback may have obliterated
the v_mount field of the upper or lower root vnode. Use these stored
objects to slightly simplify other code that needs access to the
upper/lower mount objects as well.

PR: 275870
Reported by: Karlo Miličević <karlo98.m@gmail.com>
Tested by: Karlo Miličević <karlo98.m@gmail.com>
Reviewed by: kib (prior version), olce
Differential Revision: https://reviews.freebsd.org/D43815

(cherry picked from commit cc3ec9f7597882d36ee487fd436d1b90bed0ebfd)

Details

Provenance
jahAuthored on Dec 22 2023, 8:13 PM
Reviewer
kib
Differential Revision
D43815: unionfs: cache upper/lower mount objects
Parents
rG9c530578757b: unionfs: upgrade the vnode lock during fsync() if necessary
Branches
Unknown
Tags
Unknown