Page MenuHomeFreeBSD

add a nfs_server_maxio rc variable to set vfs.nfsd.srvmaxio
ClosedPublic

Authored by rmacklem on Nov 15 2021, 8:31 PM.
Tags
None
Referenced Files
F102592073: D32997.diff
Thu, Nov 14, 12:38 PM
Unknown Object (File)
Mon, Nov 4, 9:00 AM
Unknown Object (File)
Tue, Oct 29, 10:06 AM
Unknown Object (File)
Mon, Oct 28, 7:41 PM
Unknown Object (File)
Sat, Oct 26, 5:48 PM
Unknown Object (File)
Oct 3 2024, 7:21 AM
Unknown Object (File)
Sep 27 2024, 5:12 PM
Unknown Object (File)
Sep 25 2024, 12:40 PM
Subscribers

Details

Summary

vfs.nfsd.srvmaxio can only be set when the nfsd.ko is
loaded, but the nfsd is not running.

For kernels that do not have "options NFSD", putting
the setting in vfs.nfsd.srvmaxio into /etc/sysctl.conf
does not work.

This rc variable sets vfs.nfsd.srvmaxio after nfsd.ko is
loaded, but before the nfsd is started to handle the
case where a kernel does not have "options NFSD".

Test Plan

Tested with a kernel built without "options NFSD",
plus one with "options NFSD".

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

It would be great to also document this variable in rc.conf.5.

libexec/rc/rc.d/nfsd
33

The other log message in this file starts with a capital letter. I'd try to keep it consistent.

Changed the warning message to start with a capital
letter, as suggested by 0mp.

I will do a patch for rc.conf.5 as a separate review.
(Thanks for the reminder!)

Well, the change seems alright. Assuming that the default value for nfs_server_maxio makes sense and that sysctl vfs.nfsd.srvmaxio=${nfs_server_maxio} is useful for nfsd.

libexec/rc/rc.d/nfsd
33

I'd personally paint my bikeshed "I/O" instead of "i/o", but that's probably irrelevant ;)

This revision is now accepted and ready to land.Nov 16 2021, 8:07 PM