Page MenuHomeFreeBSD

nfsd: properly virtualize nfsstatsv1
Needs ReviewPublic

Authored by glebius on Feb 23 2023, 6:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 19 2024, 1:01 PM
Unknown Object (File)
Apr 16 2024, 9:26 PM
Unknown Object (File)
Apr 15 2024, 4:48 AM
Unknown Object (File)
Apr 14 2024, 4:25 AM
Unknown Object (File)
Dec 19 2023, 4:29 AM
Unknown Object (File)
Dec 10 2023, 8:13 PM
Unknown Object (File)
Nov 18 2023, 12:38 PM
Unknown Object (File)
Nov 18 2023, 10:19 AM
Subscribers

Details

Reviewers
rmacklem
jamie
bz
Summary

Declare it as static VIMAGE structure. Mechanically convert all accesses
to the macro.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 49975
Build 46867: arc lint + arc unit

Event Timeline

And client mounts don't crash?

I would expect an amost instantaneous crash in a client mount,
since the client side is not virtualized. ie. No NFSD_CURVENT_SET()
NFSD_CURVNET_RESTORE() calls in the RPCs. (There are calls for
the nfssvc(2) syscall, but that is only used by the nfscbd(8) daemon
when it starts up.)

Since I have received emails already asking that the client side
mounts work in prisons, I will start working on that. Once that
works then, yes, this patch will be appropriate.
(To be honest. since there are few global variables used in the
NFS client, it will be mostly adding the NFSD_CURVNET_SET()
and NFSD_CURVNET_RESTORE()s. Unfortunately, they will
be needed by a fair number of the RPCs, so it will take a while
to work through them. Also, I'd like to get the server side done
first. D37741 is still in review and is needed so that mountd(8)
can do its thing in a priosn.)