Date: Fri, 15 May 2026 20:44:01 +0100 From: Oliver Pinter <oliver.pntr@gmail.com> To: Rick Macklem <rmacklem@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org> Subject: Re: git: b92b9da33006 - main - nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes Message-ID: <CAPjTQNHSV4b32g6w15auXo_i6RShzZceRUbkFLy4MEk=A5mMKQ@mail.gmail.com> In-Reply-To: <CAPjTQNH=5Vak4azNR0cUPKdWx9rNBB1iTjjOoz4Yo1JZMfqkmg@mail.gmail.com> References: <6a064e15.44875.4253434b@gitrepo.freebsd.org> <CAPjTQNH=5Vak4azNR0cUPKdWx9rNBB1iTjjOoz4Yo1JZMfqkmg@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Friday, May 15, 2026, Oliver Pinter <oliver.pntr@gmail.com> wrote: > Hi! > > On Friday, May 15, 2026, Rick Macklem <rmacklem@freebsd.org> wrote: > >> The branch main has been updated by rmacklem: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=b92b9da3300655c86dcd >> 42ea8a5ba45badd90847 >> >> commit b92b9da3300655c86dcd42ea8a5ba45badd90847 >> Author: Rick Macklem <rmacklem@FreeBSD.org> >> AuthorDate: 2026-05-14 22:33:23 +0000 >> Commit: Rick Macklem <rmacklem@FreeBSD.org> >> CommitDate: 2026-05-14 22:33:23 +0000 >> >> nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes >> >> Without this patch, the maximum setting for >> vfs.nfsd.srvmaxio was 1Mbyte. This patch increases >> that to 4Mbytes. >> >> The same as for any setting above 128Kbytes, settings up to >> 4Mbytes require that kern.ipc.maxsockbuf be increased. >> (A message generated after setting vfs.nfsd.srvmaxio via >> the /etc/rc.conf variable nfs_server_maxio will indicate >> the minimum setting, which will be somewhat greater than >> four times the setting of vfs.nfsd.srvmaxio.) >> >> Requested by: Cedric Blancher <cedric.blancher@gmail.com> >> MFC after: 2 weeks >> Fixes: 13d3bd165e22 ("subr_uio.c: Remove a KASSERT() for large NFS >> server I/O") > > > Wouldn't be better to introduce an MFC with tag, rater than abusing the > Fixes tag? This seems to me like a new "feature", rather than a bug. And it > will may be added to releasenotes also. > > (sorry, I've just seen now, the release notes, I'm going through on the commit from oldest to newest, but the other part is still relevant) > --- >> sys/fs/nfs/nfsproto.h | 3 +++ >> sys/fs/nfsserver/nfs_nfsdport.c | 5 +++-- >> 2 files changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h >> index 6e67c5be3416..1054c85d8e8f 100644 >> --- a/sys/fs/nfs/nfsproto.h >> +++ b/sys/fs/nfs/nfsproto.h >> @@ -89,8 +89,11 @@ >> * It used to be called NFS_MAXDATA, but has been renamed to clarify that >> * it refers to server side only and doesn't conflict with the >> NFS_MAXDATA >> * defined in rpcsvc/nfs_prot.h for userland. >> + * NFS_SRVMAXIO is the default setting for vfs.nfsd.srvmaxio >> + * NFS_SRVLIMITIO is the maximum setting allowed for vfs.nfsd.srvmaxio >> */ >> #define NFS_SRVMAXIO (128 * 1024) >> +#define NFS_SRVLIMITIO (4 * 1024 * 1024) >> >> /* Stat numbers for rpc returns (version 2, 3 and 4) */ >> /* >> diff --git a/sys/fs/nfsserver/nfs_nfsdport.c >> b/sys/fs/nfsserver/nfs_nfsdport.c >> index e42d5ca1e0a3..1e6936ed351c 100644 >> --- a/sys/fs/nfsserver/nfs_nfsdport.c >> +++ b/sys/fs/nfsserver/nfs_nfsdport.c >> @@ -241,8 +241,9 @@ sysctl_srvmaxio(SYSCTL_HANDLER_ARGS) >> printf("nfsd: vfs.nfsd.srvmaxio can only be increased\n"); >> return (EINVAL); >> } >> - if (newsrvmaxio > 1048576) { >> - printf("nfsd: vfs.nfsd.srvmaxio cannot be > 1Mbyte\n"); >> + if (newsrvmaxio > NFS_SRVLIMITIO) { >> + printf("nfsd: vfs.nfsd.srvmaxio cannot be > %d\n", >> + NFS_SRVLIMITIO); >> return (EINVAL); >> } >> if ((newsrvmaxio & (newsrvmaxio - 1)) != 0) { >> >> [-- Attachment #2 --] <br><br>On Friday, May 15, 2026, Oliver Pinter <<a href="mailto:oliver.pntr@gmail.com">oliver.pntr@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br><br>On Friday, May 15, 2026, Rick Macklem <<a href="mailto:rmacklem@freebsd.org" target="_blank">rmacklem@freebsd.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The branch main has been updated by rmacklem:<br> <br> URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=b92b9da3300655c86dcd42ea8a5ba45badd90847" target="_blank">https://cgit.FreeBSD.org/src/c<wbr>ommit/?id=b92b9da3300655c86dcd<wbr>42ea8a5ba45badd90847</a><br> <br> commit b92b9da3300655c86dcd42ea8a5ba4<wbr>5badd90847<br> Author: Rick Macklem <rmacklem@FreeBSD.org><br> AuthorDate: 2026-05-14 22:33:23 +0000<br> Commit: Rick Macklem <rmacklem@FreeBSD.org><br> CommitDate: 2026-05-14 22:33:23 +0000<br> <br> nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes<br> <br> Without this patch, the maximum setting for<br> vfs.nfsd.srvmaxio was 1Mbyte. This patch increases<br> that to 4Mbytes.<br> <br> The same as for any setting above 128Kbytes, settings up to<br> 4Mbytes require that kern.ipc.maxsockbuf be increased.<br> (A message generated after setting vfs.nfsd.srvmaxio via<br> the /etc/rc.conf variable nfs_server_maxio will indicate<br> the minimum setting, which will be somewhat greater than<br> four times the setting of vfs.nfsd.srvmaxio.)<br> <br> Requested by: Cedric Blancher <<a href="mailto:cedric.blancher@gmail.com" target="_blank">cedric.blancher@gmail.com</a>><br> MFC after: 2 weeks<br> Fixes: 13d3bd165e22 ("subr_uio.c: Remove a KASSERT() for large NFS server I/O")</blockquote><div><br></div><div>Wouldn't be better to introduce an MFC with tag, rater than abusing the Fixes tag? This seems to me like a new "feature", rather than a bug. And it will may be added to releasenotes also.</div><div> </div></blockquote><div><br></div><div>(sorry, I've just seen now, the release notes, I'm going through on the commit from oldest to newest, but the other part is still relevant)</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> ---<br> sys/fs/nfs/nfsproto.h | 3 +++<br> sys/fs/nfsserver/nfs_<wbr>nfsdport.c | 5 +++--<br> 2 files changed, 6 insertions(+), 2 deletions(-)<br> <br> diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h<br> index 6e67c5be3416..1054c85d8e8f 100644<br> --- a/sys/fs/nfs/nfsproto.h<br> +++ b/sys/fs/nfs/nfsproto.h<br> @@ -89,8 +89,11 @@<br> * It used to be called NFS_MAXDATA, but has been renamed to clarify that<br> * it refers to server side only and doesn't conflict with the NFS_MAXDATA<br> * defined in rpcsvc/nfs_prot.h for userland.<br> + * NFS_SRVMAXIO is the default setting for vfs.nfsd.srvmaxio<br> + * NFS_SRVLIMITIO is the maximum setting allowed for vfs.nfsd.srvmaxio<br> */<br> #define NFS_SRVMAXIO (128 * 1024)<br> +#define NFS_SRVLIMITIO (4 * 1024 * 1024)<br> <br> /* Stat numbers for rpc returns (version 2, 3 and 4) */<br> /*<br> diff --git a/sys/fs/nfsserver/nfs_nfsdpor<wbr>t.c b/sys/fs/nfsserver/nfs_nfsdpor<wbr>t.c<br> index e42d5ca1e0a3..1e6936ed351c 100644<br> --- a/sys/fs/nfsserver/nfs_nfsdpor<wbr>t.c<br> +++ b/sys/fs/nfsserver/nfs_nfsdpor<wbr>t.c<br> @@ -241,8 +241,9 @@ sysctl_srvmaxio(SYSCTL_HANDLER<wbr>_ARGS)<br> printf("nfsd: vfs.nfsd.srvmaxio can only be increased\n");<br> return (EINVAL);<br> }<br> - if (newsrvmaxio > 1048576) {<br> - printf("nfsd: vfs.nfsd.srvmaxio cannot be > 1Mbyte\n");<br> + if (newsrvmaxio > NFS_SRVLIMITIO) {<br> + printf("nfsd: vfs.nfsd.srvmaxio cannot be > %d\n",<br> + NFS_SRVLIMITIO);<br> return (EINVAL);<br> }<br> if ((newsrvmaxio & (newsrvmaxio - 1)) != 0) {<br> <br> </blockquote> </blockquote>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPjTQNHSV4b32g6w15auXo_i6RShzZceRUbkFLy4MEk=A5mMKQ>
