Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Dec 2017 00:44:11 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r326891 - stable/11/sys/fs/nfs
Message-ID:  <201712160044.vBG0iBMI082412@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Sat Dec 16 00:44:11 2017
New Revision: 326891
URL: https://svnweb.freebsd.org/changeset/base/326891

Log:
  Add vfs.nfs.suppress_32bits_warning sysctl which reduces the frequency
  of 'fileid > 32bits' warnings from at most once per minute to at most
  once per day.
  
  Direct commit to stable/11 since the relevant code was removed from HEAD
  following the switch to 64-bit inodes.
  
  Requested by:	Rafal Lukawiecki
  Approved by:	rmacklem

Modified:
  stable/11/sys/fs/nfs/nfs_commonsubs.c

Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- stable/11/sys/fs/nfs/nfs_commonsubs.c	Fri Dec 15 23:50:26 2017	(r326890)
+++ stable/11/sys/fs/nfs/nfs_commonsubs.c	Sat Dec 16 00:44:11 2017	(r326891)
@@ -69,6 +69,7 @@ int nfsrv_lease = NFSRV_LEASE;
 int ncl_mbuf_mlen = MLEN;
 int nfsd_enable_stringtouid = 0;
 static int nfs_enable_uidtostring = 0;
+static int nfs_suppress_32bits_warning = 0;
 NFSNAMEIDMUTEX;
 NFSSOCKMUTEX;
 extern int nfsrv_lughashsize;
@@ -76,6 +77,8 @@ extern int nfsrv_lughashsize;
 SYSCTL_DECL(_vfs_nfs);
 SYSCTL_INT(_vfs_nfs, OID_AUTO, enable_uidtostring, CTLFLAG_RW,
     &nfs_enable_uidtostring, 0, "Make nfs always send numeric owner_names");
+SYSCTL_INT(_vfs_nfs, OID_AUTO, suppress_32bits_warning, CTLFLAG_RW,
+    &nfs_suppress_32bits_warning, 0, "Suppress \"> 32 bits\" warnings");
 
 /*
  * This array of structures indicates, for V4:
@@ -836,7 +839,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
 	static size_t count64fileid;
 	static struct timeval last64mountfileid;
 	static size_t count64mountfileid;
-	static struct timeval warninterval = { 60, 0 };
+	struct timeval warninterval =
+	    { nfs_suppress_32bits_warning ? 86400 : 60, 0 };
 
 	if (compare) {
 		retnotsup = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712160044.vBG0iBMI082412>