HomeFreeBSD

nfsd: Prepare the NFS server code to run in a vnet prison

Description

nfsd: Prepare the NFS server code to run in a vnet prison

This patch defines null macros that can be used to apply
the vnet macros for global variables and SYSCTL flags.
It also applies these macros to many of the global variables
and some of the SYSCTLs. Since the macros do nothing, these
changes should not result in semantics changes, although the
changes are large in number.

The patch does change several global variables that were
arrays or structures to pointers to same. For these variables,
modified initialization and cleanup code malloc's and free's
the arrays/structures. This was done so that the vnet footprint
would be about 300bytes when the macros are defined as vnet macros,
allowing nfsd.ko to load dynamically.

I believe the comments in D37519 have been addressed, although
it has never been reviewed, due in part to the large size of the patch.
This is the first of a series of patches that will put D37519 in main.

Once everything is in main, the macros will be defined as front
end macros to the vnet ones.

(cherry picked from commit 7e44856e3a6deb194c2c376e886854b256360c40)

Details

Provenance
rmacklemAuthored on Feb 11 2023, 11:51 PM
Parents
rGd42fa41bc2ed: Make SMCCC usable by device drivers
Branches
Unknown
Tags
Unknown