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
Unknown Object (File)
Sat, Mar 16, 4:29 AM
Unknown Object (File)
Feb 20 2024, 7:20 AM
Unknown Object (File)
Feb 9 2024, 6:35 PM
Unknown Object (File)
Jan 12 2024, 12:55 AM
Unknown Object (File)
Dec 31 2023, 1:35 AM
Unknown Object (File)
Dec 28 2023, 6:19 PM
Unknown Object (File)
Dec 23 2023, 6:39 PM
Unknown Object (File)
Dec 22 2023, 11:43 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 Not Applicable
Unit
Tests Not Applicable

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