HomeFreeBSD

fd: move vnodes out of filedesc into a dedicated structure

Description

fd: move vnodes out of filedesc into a dedicated structure

The new structure is copy-on-write. With the assumption that path lookups are
significantly more frequent than chdirs and chrooting this is a win.

This provides stable root and jail root vnodes without the need to reference
them on lookup, which in turn means less work on globally shared structures.
Note this also happens to fix a bug where jail vnode was never referenced,
meaning subsequent access on lookup could run into use-after-free.

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

Details

Provenance
mjgAuthored on Mar 1 2020, 9:53 PM
Parents
rG8243063f9b51: fd: make fgetvp_rights work without the filedesc lock
Branches
Unknown
Tags
Unknown