]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsd: Prepare the NFS server code to run in a vnet prison
authorRick Macklem <rmacklem@FreeBSD.org>
Sat, 11 Feb 2023 23:51:19 +0000 (15:51 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Sat, 11 Feb 2023 23:51:19 +0000 (15:51 -0800)
commit7e44856e3a6deb194c2c376e886854b256360c40
treed0f9143154f43e00940472d80207e63be5da45fe
parent6957cd86d9143f5ff179515e52fc42946e642f66
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.

MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D37519
sys/fs/nfs/nfs_var.h
sys/fs/nfs/nfsport.h
sys/fs/nfsserver/nfs_fha_new.c
sys/fs/nfsserver/nfs_nfsdcache.c
sys/fs/nfsserver/nfs_nfsdkrpc.c
sys/fs/nfsserver/nfs_nfsdport.c
sys/fs/nfsserver/nfs_nfsdsocket.c
sys/fs/nfsserver/nfs_nfsdstate.c
sys/fs/nfsserver/nfs_nfsdsubs.c