[Midnightbsd-cvs] src [10373] U trunk/usr.sbin/nfsd/stablerestart.5: sync with freebsd 10-stable

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Jun 3 19:20:08 EDT 2018


Revision: 10373
          http://svnweb.midnightbsd.org/src/?rev=10373
Author:   laffer1
Date:     2018-06-03 19:20:07 -0400 (Sun, 03 Jun 2018)
Log Message:
-----------
sync with freebsd 10-stable

Modified Paths:
--------------
    trunk/usr.sbin/nfsd/Makefile
    trunk/usr.sbin/nfsd/nfsd.8
    trunk/usr.sbin/nfsd/nfsd.c
    trunk/usr.sbin/nfsd/nfsv4.4

Property Changed:
----------------
    trunk/usr.sbin/nfsd/nfsd.8
    trunk/usr.sbin/nfsd/nfsv4.4
    trunk/usr.sbin/nfsd/stablerestart.5

Modified: trunk/usr.sbin/nfsd/Makefile
===================================================================
--- trunk/usr.sbin/nfsd/Makefile	2018-06-03 23:17:01 UTC (rev 10372)
+++ trunk/usr.sbin/nfsd/Makefile	2018-06-03 23:20:07 UTC (rev 10373)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/nfsd/Makefile 201390 2010-01-02 11:07:44Z ed $
 
 PROG=	nfsd
 MAN=	nfsd.8 nfsv4.4 stablerestart.5

Modified: trunk/usr.sbin/nfsd/nfsd.8
===================================================================
--- trunk/usr.sbin/nfsd/nfsd.8	2018-06-03 23:17:01 UTC (rev 10372)
+++ trunk/usr.sbin/nfsd/nfsd.8	2018-06-03 23:20:07 UTC (rev 10373)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -26,9 +27,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)nfsd.8	8.4 (Berkeley) 3/29/95
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.sbin/nfsd/nfsd.8 277591 2015-01-23 18:45:22Z delphij $
 .\"
-.Dd April 23, 2011
+.Dd January 1, 2015
 .Dt NFSD 8
 .Os
 .Sh NAME
@@ -41,6 +42,8 @@
 .Op Fl arduteo
 .Op Fl n Ar num_servers
 .Op Fl h Ar bindip
+.Op Fl Fl maxthreads Ar max_threads
+.Op Fl Fl minthreads Ar min_threads
 .Sh DESCRIPTION
 The
 .Nm
@@ -51,7 +54,7 @@
 .Nm
 must be running for a machine to operate as a server.
 .Pp
-Unless otherwise specified, four servers for
+Unless otherwise specified, eight servers per CPU for
 .Tn UDP
 transport are started.
 .Pp
@@ -74,8 +77,17 @@
 service with
 .Xr rpcbind 8
 without creating any servers.
-.It Fl n
-Specifies how many servers to create.
+.It Fl n Ar threads
+Specifies how many servers to create.  This option is equivalent to specifying
+.Fl Fl maxthreads
+and
+.Fl Fl minthreads
+with their respective arguments to
+.Ar threads .
+.It Fl Fl maxthreads Ar threads
+Specifies the maximum servers that will be kept around to service requests.
+.It Fl Fl minthreads Ar threads
+Specifies the minimum servers that will be kept around to service requests.
 .It Fl h Ar bindip
 Specifies which IP address or hostname to bind to on the local host.
 This option is recommended when a host has multiple interfaces.
@@ -164,6 +176,24 @@
 would then be used to block nfs-related packets that come in on the outside
 interface.
 .Pp
+If the server has stopped servicing clients and has generated a console message
+like
+.Dq Li "nfsd server cache flooded..." ,
+the value for vfs.nfsd.tcphighwater needs to be increased.
+This should allow the server to again handle requests without a reboot.
+Also, you may want to consider decreasing the value for
+vfs.nfsd.tcpcachetimeo to several minutes (in seconds) instead of 12 hours
+when this occurs.
+.Pp
+Unfortunately making vfs.nfsd.tcphighwater too large can result in the mbuf
+limit being reached, as indicated by a console message
+like
+.Dq Li "kern.ipc.nmbufs limit reached" .
+If you cannot find values of the above
+.Nm sysctl
+values that work, you can disable the DRC cache for TCP by setting
+vfs.nfsd.cachetcp to 0.
+.Pp
 The
 .Nm
 utility has to be terminated with


Property changes on: trunk/usr.sbin/nfsd/nfsd.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/nfsd/nfsd.c
===================================================================
--- trunk/usr.sbin/nfsd/nfsd.c	2018-06-03 23:17:01 UTC (rev 10372)
+++ trunk/usr.sbin/nfsd/nfsd.c	2018-06-03 23:20:07 UTC (rev 10373)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1989, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -41,7 +42,7 @@
 static char sccsid[] = "@(#)nfsd.c	8.9 (Berkeley) 3/29/95";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/usr.sbin/nfsd/nfsd.c 281520 2015-04-14 09:58:10Z mav $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -53,6 +54,7 @@
 #include <sys/module.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/sysctl.h>
 #include <sys/ucred.h>
 
 #include <rpc/rpc.h>
@@ -71,42 +73,55 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <sysexits.h>
 
-/* Global defs */
-#ifdef DEBUG
-#define	syslog(e, s...)	fprintf(stderr,s)
-int	debug = 1;
-#else
-int	debug = 0;
-#endif
+#include <getopt.h>
 
+static int	debug = 0;
+
 #define	NFSD_STABLERESTART	"/var/db/nfs-stablerestart"
 #define	NFSD_STABLEBACKUP	"/var/db/nfs-stablerestart.bak"
 #define	MAXNFSDCNT	256
 #define	DEFNFSDCNT	 4
-pid_t	children[MAXNFSDCNT];	/* PIDs of children */
-int	nfsdcnt;		/* number of children */
-int	new_syscall;
-int	run_v4server = 1;	/* Force running of nfsv4 server */
-int	nfssvc_nfsd;		/* Set to correct NFSSVC_xxx flag */
-int	stablefd = -1;		/* Fd for the stable restart file */
-int	backupfd;		/* Fd for the backup stable restart file */
+static pid_t children[MAXNFSDCNT]; /* PIDs of children */
+static int nfsdcnt;		/* number of children */
+static int nfsdcnt_set;
+static int minthreads;
+static int maxthreads;
+static int new_syscall;
+static int run_v4server = 1;	/* Force running of nfsv4 server */
+static int nfssvc_nfsd;		/* Set to correct NFSSVC_xxx flag */
+static int stablefd = -1;	/* Fd for the stable restart file */
+static int backupfd;		/* Fd for the backup stable restart file */
+static const char *getopt_shortopts;
+static const char *getopt_usage;
 
-void	cleanup(int);
-void	child_cleanup(int);
-void	killchildren(void);
-void	nfsd_exit(int);
-void	nonfs(int);
-void	reapchild(int);
-int	setbindhost(struct addrinfo **ia, const char *bindhost,
-	    struct addrinfo hints);
-void	start_server(int);
-void	unregistration(void);
-void	usage(void);
-void	open_stable(int *, int *);
-void	copy_stable(int, int);
-void	backup_stable(int);
+static int minthreads_set;
+static int maxthreads_set;
 
+static struct option longopts[] = {
+	{ "debug", no_argument, &debug, 1 },
+	{ "minthreads", required_argument, &minthreads_set, 1 },
+	{ "maxthreads", required_argument, &maxthreads_set, 1 },
+	{ NULL, 0, NULL, 0}
+};
+
+static void	cleanup(int);
+static void	child_cleanup(int);
+static void	killchildren(void);
+static void	nfsd_exit(int);
+static void	nonfs(int);
+static void	reapchild(int);
+static int	setbindhost(struct addrinfo **ia, const char *bindhost,
+		    struct addrinfo hints);
+static void	start_server(int);
+static void	unregistration(void);
+static void	usage(void);
+static void	open_stable(int *, int *);
+static void	copy_stable(int, int);
+static void	backup_stable(int);
+static void	set_nfsdcnt(int);
+
 /*
  * Nfs server daemon mostly just a user context for nfssvc()
  *
@@ -145,6 +160,8 @@
 	int udpflag, ecode, error, s, srvcnt;
 	int bindhostc, bindanyflag, rpcbreg, rpcbregcnt;
 	int nfssvc_addsock;
+	int longindex = 0;
+	const char *lopt;
 	char **bindhost = NULL;
 	pid_t pid;
 
@@ -151,20 +168,19 @@
 	nfsdcnt = DEFNFSDCNT;
 	unregister = reregister = tcpflag = maxsock = 0;
 	bindanyflag = udpflag = connect_type_cnt = bindhostc = 0;
-#define	GETOPT	"ah:n:rdtueo"
-#define	USAGE	"[-ardtueo] [-n num_servers] [-h bindip]"
-	while ((ch = getopt(argc, argv, GETOPT)) != -1)
+	getopt_shortopts = "ah:n:rdtueo";
+	getopt_usage =
+	    "usage:\n"
+	    "  nfsd [-ardtueo] [-h bindip]\n"
+	    "       [-n numservers] [--minthreads #] [--maxthreads #]\n";
+	while ((ch = getopt_long(argc, argv, getopt_shortopts, longopts,
+		    &longindex)) != -1)
 		switch (ch) {
 		case 'a':
 			bindanyflag = 1;
 			break;
 		case 'n':
-			nfsdcnt = atoi(optarg);
-			if (nfsdcnt < 1 || nfsdcnt > MAXNFSDCNT) {
-				warnx("nfsd count %d; reset to %d", nfsdcnt,
-				    DEFNFSDCNT);
-				nfsdcnt = DEFNFSDCNT;
-			}
+			set_nfsdcnt(atoi(optarg));
 			break;
 		case 'h':
 			bindhostc++;
@@ -193,6 +209,14 @@
 		case 'o':
 			run_v4server = 0;
 			break;
+		case 0:
+			lopt = longopts[longindex].name;
+			if (!strcmp(lopt, "minthreads")) {
+				minthreads = atoi(optarg);
+			} else if (!strcmp(lopt, "maxthreads")) {
+				maxthreads = atoi(optarg);
+			}
+			break;
 		default:
 		case '?':
 			usage();
@@ -201,6 +225,10 @@
 		udpflag = 1;
 	argv += optind;
 	argc -= optind;
+	if (minthreads_set && maxthreads_set && minthreads > maxthreads)
+		errx(EX_USAGE,
+		    "error: minthreads(%d) can't be greater than "
+		    "maxthreads(%d)", minthreads, maxthreads);
 
 	/*
 	 * XXX
@@ -208,14 +236,8 @@
 	 */
 	if (argc > 1)
 		usage();
-	if (argc == 1) {
-		nfsdcnt = atoi(argv[0]);
-		if (nfsdcnt < 1 || nfsdcnt > MAXNFSDCNT) {
-			warnx("nfsd count %d; reset to %d", nfsdcnt,
-			    DEFNFSDCNT);
-			nfsdcnt = DEFNFSDCNT;
-		}
-	}
+	if (argc == 1)
+		set_nfsdcnt(atoi(argv[0]));
 
 	/*
 	 * Unless the "-o" option was specified, try and run "nfsd".
@@ -356,7 +378,7 @@
 	(void)signal(SIGCHLD, reapchild);
 	(void)signal(SIGUSR2, backup_stable);
 
-	openlog("nfsd", LOG_PID, LOG_DAEMON);
+	openlog("nfsd", LOG_PID | (debug ? LOG_PERROR : 0), LOG_DAEMON);
 
 	/*
 	 * For V4, we open the stablerestart file and call nfssvc()
@@ -374,13 +396,13 @@
 	if (run_v4server > 0) {
 		open_stable(&stablefd, &backupfd);
 		if (stablefd < 0) {
-			syslog(LOG_ERR, "Can't open %s\n", NFSD_STABLERESTART);
+			syslog(LOG_ERR, "Can't open %s: %m\n", NFSD_STABLERESTART);
 			exit(1);
 		}
 		/* This system call will fail for old kernels, but that's ok. */
 		nfssvc(NFSSVC_BACKUPSTABLE, NULL);
 		if (nfssvc(NFSSVC_STABLERESTART, (caddr_t)&stablefd) < 0) {
-			syslog(LOG_ERR, "Can't read stable storage file\n");
+			syslog(LOG_ERR, "Can't read stable storage file: %m\n");
 			exit(1);
 		}
 		nfssvc_addsock = NFSSVC_NFSDADDSOCK;
@@ -605,7 +627,7 @@
 					    bindhost[i]);
 					nfsd_exit(1);
 				}
-				if (listen(tcpsock, 5) < 0) {
+				if (listen(tcpsock, -1) < 0) {
 					syslog(LOG_ERR, "listen failed");
 					nfsd_exit(1);
 				}
@@ -680,7 +702,7 @@
 					    bindhost[i]);
 					nfsd_exit(1);
 				}
-				if (listen(tcp6sock, 5) < 0) {
+				if (listen(tcp6sock, -1) < 0) {
 					syslog(LOG_ERR, "listen failed");
 					nfsd_exit(1);
 				}
@@ -806,7 +828,7 @@
 	}
 }
 
-int
+static int
 setbindhost(struct addrinfo **ai, const char *bindhost, struct addrinfo hints)
 {
 	int ecode;
@@ -852,20 +874,37 @@
 	return (0);
 }
 
-void
+static void
+set_nfsdcnt(int proposed)
+{
+
+	if (proposed < 1) {
+		warnx("nfsd count too low %d; reset to %d", proposed,
+		    DEFNFSDCNT);
+		nfsdcnt = DEFNFSDCNT;
+	} else if (proposed > MAXNFSDCNT) {
+		warnx("nfsd count too high %d; truncated to %d", proposed,
+		    MAXNFSDCNT);
+		nfsdcnt = MAXNFSDCNT;
+	} else
+		nfsdcnt = proposed;
+	nfsdcnt_set = 1;
+}
+
+static void
 usage(void)
 {
-	(void)fprintf(stderr, "usage: nfsd %s\n", USAGE);
+	(void)fprintf(stderr, "%s", getopt_usage);
 	exit(1);
 }
 
-void
+static void
 nonfs(__unused int signo)
 {
 	syslog(LOG_ERR, "missing system call: NFS not available");
 }
 
-void
+static void
 reapchild(__unused int signo)
 {
 	pid_t pid;
@@ -878,7 +917,7 @@
 	}
 }
 
-void
+static void
 unregistration(void)
 {
 	if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) ||
@@ -886,7 +925,7 @@
 		syslog(LOG_ERR, "rpcb_unset failed");
 }
 
-void
+static void
 killchildren(void)
 {
 	int i;
@@ -900,7 +939,7 @@
 /*
  * Cleanup master after SIGUSR1.
  */
-void
+static void
 cleanup(__unused int signo)
 {
 	nfsd_exit(0);
@@ -909,13 +948,13 @@
 /*
  * Cleanup child after SIGUSR1.
  */
-void
+static void
 child_cleanup(__unused int signo)
 {
 	exit(0);
 }
 
-void
+static void
 nfsd_exit(int status)
 {
 	killchildren();
@@ -923,7 +962,30 @@
 	exit(status);
 }
 
-void
+static int
+get_tuned_nfsdcount(void)
+{
+	int ncpu, error, tuned_nfsdcnt;
+	size_t ncpu_size;
+
+	ncpu_size = sizeof(ncpu);
+	error = sysctlbyname("hw.ncpu", &ncpu, &ncpu_size, NULL, 0);
+	if (error) {
+		warnx("sysctlbyname(hw.ncpu) failed defaulting to %d nfs servers",
+		    DEFNFSDCNT);
+		tuned_nfsdcnt = DEFNFSDCNT;
+	} else {
+		tuned_nfsdcnt = ncpu * 8;
+	}
+	if (!new_syscall && tuned_nfsdcnt > MAXNFSDCNT) {
+		warnx("nfsd count %d; truncated to %d", tuned_nfsdcnt,
+		    MAXNFSDCNT);
+		tuned_nfsdcnt = MAXNFSDCNT;
+	}
+	return tuned_nfsdcnt;
+}
+
+static void
 start_server(int master)
 {
 	char principal[MAXHOSTNAMELEN + 5];
@@ -952,8 +1014,15 @@
 			}
 		}
 		nfsdargs.principal = principal;
-		nfsdargs.minthreads = nfsdcnt;
-		nfsdargs.maxthreads = nfsdcnt;
+
+		if (nfsdcnt_set)
+			nfsdargs.minthreads = nfsdargs.maxthreads = nfsdcnt;
+		else {
+			nfsdargs.minthreads = minthreads_set ? minthreads : get_tuned_nfsdcount();
+			nfsdargs.maxthreads = maxthreads_set ? maxthreads : nfsdargs.minthreads;
+			if (nfsdargs.maxthreads < nfsdargs.minthreads)
+				nfsdargs.maxthreads = nfsdargs.minthreads;
+		}
 		error = nfssvc(nfssvc_nfsd, &nfsdargs);
 		if (error < 0 && errno == EAUTH) {
 			/*
@@ -985,7 +1054,7 @@
 /*
  * Open the stable restart file and return the file descriptor for it.
  */
-void
+static void
 open_stable(int *stable_fdp, int *backup_fdp)
 {
 	int stable_fd, backup_fd = -1, ret;
@@ -1037,7 +1106,7 @@
 /*
  * Copy the stable restart file to the backup or vice versa.
  */
-void
+static void
 copy_stable(int from_fd, int to_fd)
 {
 	int cnt, ret;
@@ -1065,7 +1134,7 @@
 /*
  * Back up the stable restart file when indicated by the kernel.
  */
-void
+static void
 backup_stable(__unused int signo)
 {
 

Modified: trunk/usr.sbin/nfsd/nfsv4.4
===================================================================
--- trunk/usr.sbin/nfsd/nfsv4.4	2018-06-03 23:17:01 UTC (rev 10372)
+++ trunk/usr.sbin/nfsd/nfsv4.4	2018-06-03 23:20:07 UTC (rev 10373)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 2009 Rick Macklem, University of Guelph
 .\" All rights reserved.
 .\"
@@ -22,9 +23,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.sbin/nfsd/nfsv4.4 321597 2017-07-27 00:04:09Z rmacklem $
 .\"
-.Dd May 1, 2013
+.Dd July 19, 2017
 .Dt NFSV4 4
 .Os
 .Sh NAME
@@ -34,7 +35,8 @@
 The NFS client and server provides support for the
 .Tn NFSv4
 specification; see
-.%T "Network File System (NFS) Version 4 Protocol RFC 3530" .
+.%T "Network File System (NFS) Version 4 Protocol RFC 7530" and
+.%T "Network File System (NFS) Version 4 Minor Version 1 Protocol RFC 5661" .
 The protocol is somewhat similar to NFS Version 3, but differs in significant
 ways.
 It uses a single compound RPC that concatenates operations to-gether.
@@ -74,6 +76,7 @@
 - Referrals, which redirect subtrees to other servers
   (not yet implemented)
 - Delegations, which allow a client to operate on a file locally
+- pNFS, where I/O operations are separated from Metadata operations
 .Ed
 .Pp
 The
@@ -115,8 +118,8 @@
 this.
 .Pp
 .Nm
-uses names for users and groups instead of numbers.
-On the wire, they
+uses strings for users and groups instead of numbers.
+On the wire, these strings can either have the numbers in the string or
 take the form:
 .sp
 .Bd -literal -offset indent -compact
@@ -136,15 +139,37 @@
 .Xr nfsuserd 8
 and has a command line option that overrides the domain component of the
 machine's hostname.
-For use of
+For use of this form of string on
 .Nm ,
 either client or server, this daemon must be running.
-If this ``<dns.domain>'' is not set correctly or the daemon is not running, ``ls -l'' will typically
+.Pp
+The form where the numbers are in the strings can only be used for AUTH_SYS.
+To configure your systems this way, the
+.Xr nfsuserd 8
+daemon does not need to be running on the server, but the following sysctls need to be
+set to 1 on the server.
+.sp
+.Bd -literal -offset indent -compact
+vfs.nfs.enable_uidtostring
+vfs.nfsd.enable_stringtouid
+.Ed
+.sp
+On the client, the sysctl
+.sp
+.Bd -literal -offset indent -compact
+vfs.nfs.enable_uidtostring
+.Ed
+.sp
+must be set to 1 and the
+.Xr nfsuserd 8
+daemon does not need to be running.
+.Pp
+If these strings are not configured correctly, ``ls -l'' will typically
 report a lot of ``nobody'' and ``nogroup'' ownerships.
 .Pp
 Although uid/gid numbers are no longer used in the
 .Nm
-protocol, they will still be in the RPC authentication fields when
+protocol except optionally in the above strings, they will still be in the RPC authentication fields when
 using AUTH_SYS (sec=sys), which is the default.
 As such, in this case both the user/group name and number spaces must
 be consistent between the client and server.
@@ -154,10 +179,9 @@
 with RPCSEC_GSS (sec=krb5, krb5i, krb5p), only names and KerberosV tickets
 will go on the wire.
 .Sh SERVER SETUP
-.Pp
 To set up the NFS server that supports
 .Nm ,
-you will need to either set the variables in
+you will need to set the variables in
 .Xr rc.conf 5
 as follows:
 .sp
@@ -164,17 +188,17 @@
 .Bd -literal -offset indent -compact
 nfs_server_enable="YES"
 nfsv4_server_enable="YES"
+.Ed
+.sp
+plus
+.sp
+.Bd -literal -offset indent -compact
 nfsuserd_enable="YES"
 .Ed
 .sp
-or start
-.Xr mountd 8
-and
-.Xr nfsd 8
-without the ``-o'' option, which would force use of the old server.
-The
-.Xr nfsuserd 8
-daemon must also be running.
+if the server is using the ``<user>@<domain>'' form of user/group strings or
+is using the ``-manage-gids'' option for
+.Xr nfsuserd 8 .
 .Pp
 You will also need to add at least one ``V4:'' line to the
 .Xr exports 5
@@ -221,7 +245,6 @@
 .Xr config 5
 file.
 .Sh CLIENT MOUNTS
-.Pp
 To do an
 .Nm
 mount, specify the ``nfsv4'' option on the
@@ -234,7 +257,21 @@
 .Pp
 The
 .Xr nfsuserd 8
-must be running, as above.
+must be running if name<->uid/gid mapping is being used, as above.
+Also, since an
+.Nm
+mount uses the host uuid to identify the client uniquely to the server,
+you cannot safely do an
+.Nm
+mount when
+.sp
+.Bd -literal -offset indent -compact
+hostid_enable="NO"
+.Ed
+.sp
+is set in
+.Xr rc.conf 5 .
+.sp
 If the
 .Nm
 server that is being mounted on supports delegations, you can start the
@@ -243,7 +280,7 @@
 This will occur if
 .sp
 .Bd -literal -offset indent -compact
-nfsuserd_enable="YES"
+nfsuserd_enable="YES"	<-- If name<->uid/gid mapping is being used.
 nfscbd_enable="YES"
 .Ed
 .sp
@@ -253,7 +290,7 @@
 Without a functioning callback path, a server will never issue Delegations
 to a client.
 .sp
-By default, the callback address will be set to the IP address acquired via
+For NFSv4.0, by default, the callback address will be set to the IP address acquired via
 rtalloc() in the kernel and port# 7745.
 To override the default port#, a command line option for
 .Xr nfscbd 8
@@ -270,6 +307,10 @@
 where the first 4 Ns are the host IP address and the last two are the
 port# in network byte order (all decimal #s in the range 0-255).
 .Pp
+For NFSv4.1, the callback path (called a backchannel) uses the same TCP connection as the mount,
+so none of the above applies and should work through gateways without
+any issues.
+.Pp
 To build a kernel with the client that supports
 .Nm
 linked into it, the option
@@ -310,7 +351,7 @@
 .Xr nfsd 8 ,
 .Xr nfsdumpstate 8 ,
 .Xr nfsrevoke 8 ,
-.Xr nfsuserd 8 ,
+.Xr nfsuserd 8
 .Sh BUGS
 At this time, there is no recall of delegations for local file system
 operations.


Property changes on: trunk/usr.sbin/nfsd/nfsv4.4
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Index: trunk/usr.sbin/nfsd/stablerestart.5
===================================================================
--- trunk/usr.sbin/nfsd/stablerestart.5	2018-06-03 23:17:01 UTC (rev 10372)
+++ trunk/usr.sbin/nfsd/stablerestart.5	2018-06-03 23:20:07 UTC (rev 10373)

Property changes on: trunk/usr.sbin/nfsd/stablerestart.5
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list