svn commit: r336296 - projects/pnfs-planb-server/sys/fs/nfs

Rick Macklem rmacklem at FreeBSD.org
Sat Jul 14 20:44:26 UTC 2018


Author: rmacklem
Date: Sat Jul 14 20:44:25 2018
New Revision: 336296
URL: https://svnweb.freebsd.org/changeset/base/336296

Log:
  Add a comment explaining why the timeout for DS connections is set to
  lease_duration/4.

Modified:
  projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c

Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c	Sat Jul 14 20:39:10 2018	(r336295)
+++ projects/pnfs-planb-server/sys/fs/nfs/nfs_commonkrpc.c	Sat Jul 14 20:44:25 2018	(r336296)
@@ -302,7 +302,16 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq
 		if (NFSHASNFSV4N(nmp)) {
 			if (cred != NULL) {
 				if (NFSHASSOFT(nmp)) {
-					/* This should be a DS mount. */
+					/*
+					 * This should be a DS mount.  If the
+					 * timeout is set to 1/4th of the lease
+					 * duration, the DS should be disabled
+					 * at approximately 1/2 lease duration,
+					 * due to a retry count of 2.
+					 * This will hopefully cause the client
+					 * to continue without the disabled
+					 * DS in less than the lease duration.
+					 */
 					timo.tv_sec = nfsrv_lease / 4;
 					if (timo.tv_sec < 10)
 						timo.tv_sec = 10;
@@ -337,6 +346,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq
 				 * not maintain open/lock state and is the
 				 * only case where using a "soft" mount is
 				 * recommended for NFSv4.
+				 * See the comment above w.r.t. timeout.
 				 */
 				timo.tv_sec = nfsrv_lease / 4;
 				if (timo.tv_sec < 10)


More information about the svn-src-projects mailing list