Page MenuHomeFreeBSD

nfsd: properly virtualize nfsstatsv1
Needs ReviewPublic

Authored by glebius on Feb 23 2023, 6:28 AM.
Tags
None
Referenced Files
F102954270: D38743.diff
Tue, Nov 19, 4:02 AM
Unknown Object (File)
Oct 1 2024, 1:38 PM
Unknown Object (File)
Sep 24 2024, 7:53 PM
Unknown Object (File)
Sep 15 2024, 6:30 PM
Unknown Object (File)
Sep 10 2024, 12:13 PM
Unknown Object (File)
Sep 1 2024, 2:30 PM
Unknown Object (File)
Sep 1 2024, 2:29 PM
Unknown Object (File)
Sep 1 2024, 2:18 PM
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.)