svn commit: r326891 - stable/11/sys/fs/nfs
Colin Percival
cperciva at FreeBSD.org
Sat Dec 16 00:44:12 UTC 2017
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;
More information about the svn-src-all
mailing list