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.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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

libexec/rc/rc.d/nfsd
32

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
32

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