FreeBSD Bugzilla – Attachment 223005 Details for
Bug 253901
nfsv4_server values in /etc/rc.conf appear to not be functioning as intended
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
make mountd syslog that a V4: line is needed for NFSv4 service
v4ex.patch (text/plain), 1.54 KB, created by
Rick Macklem
on 2021-03-05 15:31:44 UTC
(
hide
)
Description:
make mountd syslog that a V4: line is needed for NFSv4 service
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2021-03-05 15:31:44 UTC
Size:
1.54 KB
patch
obsolete
>--- usr.sbin/mountd/mountd.c.sav 2021-03-05 07:17:34.805365000 -0800 >+++ usr.sbin/mountd/mountd.c 2021-03-05 07:17:34.804496000 -0800 >@@ -1888,10 +1888,11 @@ get_exportlist(int passno) > struct iovec *iov; > struct statfs *mntbufp; > char errmsg[255]; >- int num, i; >+ int error, i, nfs_maxvers, num; > int iovlen; > struct nfsex_args eargs; > FILE *debug_file; >+ size_t nfs_maxvers_size; > > if ((debug_file = fopen(_PATH_MOUNTDDEBUG, "r")) != NULL) { > fclose(debug_file); >@@ -2013,6 +2014,21 @@ get_exportlist(int passno) > > /* Read the export file(s) and process them */ > read_exportfile(0); >+ } >+ >+ if (strlen(v4root_dirpath) == 0) { >+ /* Check to see if a V4: line is needed. */ >+ nfs_maxvers_size = sizeof(nfs_maxvers); >+ error = sysctlbyname("vfs.nfsd.server_max_nfsvers", >+ &nfs_maxvers, &nfs_maxvers_size, NULL, 0); >+ if (error != 0 || nfs_maxvers < NFS_VER2 || nfs_maxvers > >+ NFS_VER4) { >+ syslog(LOG_ERR, "sysctlbyname(vfs.nfsd." >+ "server_max_nfsvers) failed, defaulting to NFSv3"); >+ nfs_maxvers = NFS_VER3; >+ } >+ if (nfs_maxvers == NFS_VER4) >+ syslog(LOG_ERR, "NFSv4 requires at least one V4: line"); > } > > if (iov != NULL) { >--- libexec/rc/rc.d/mountd.sav 2021-03-05 07:16:56.409937000 -0800 >+++ libexec/rc/rc.d/mountd 2021-03-05 07:17:55.394073000 -0800 >@@ -34,6 +34,9 @@ mountd_precmd() > rc_flags="${rc_flags} -R" > else > force_depend rpcbind || return 1 >+ if ! checkyesno nfsv4_server_enable; then >+ sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null >+ fi > fi > > # mountd flags will differ depending on rc.conf settings
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253901
: 223005