svn commit: r310322 - stable/10/sys/fs/nfs
Colin Percival
cperciva at FreeBSD.org
Tue Dec 20 08:42:48 UTC 2016
Author: cperciva
Date: Tue Dec 20 08:42:47 2016
New Revision: 310322
URL: https://svnweb.freebsd.org/changeset/base/310322
Log:
MFC r308708: Reduce verbosity of warnings about truncating NFS fileids to
32-bit inode numbers.
Modified:
stable/10/sys/fs/nfs/nfs_commonsubs.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- stable/10/sys/fs/nfs/nfs_commonsubs.c Tue Dec 20 08:01:17 2016 (r310321)
+++ stable/10/sys/fs/nfs/nfs_commonsubs.c Tue Dec 20 08:42:47 2016 (r310322)
@@ -827,6 +827,11 @@ nfsv4_loadattr(struct nfsrv_descript *nd
struct dqblk dqb;
uid_t savuid;
#endif
+ static struct timeval last64fileid;
+ static size_t count64fileid;
+ static struct timeval last64mountfileid;
+ static size_t count64mountfileid;
+ static struct timeval warninterval = { 60, 0 };
if (compare) {
retnotsup = 0;
@@ -1196,8 +1201,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd
*retcmpp = NFSERR_NOTSAME;
}
} else if (nap != NULL) {
- if (*tl++)
- printf("NFSv4 fileid > 32bits\n");
+ if (*tl++) {
+ count64fileid++;
+ if (ratecheck(&last64fileid, &warninterval)) {
+ printf("NFSv4 fileid > 32bits (%zu occurrences)\n",
+ count64fileid);
+ count64fileid = 0;
+ }
+ }
nap->na_fileid = thyp;
}
attrsum += NFSX_HYPER;
@@ -1734,8 +1745,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd
}
}
} else if (nap != NULL) {
- if (*tl++)
- printf("NFSv4 mounted on fileid > 32bits\n");
+ if (*tl++) {
+ count64mountfileid++;
+ if (ratecheck(&last64mountfileid, &warninterval)) {
+ printf("NFSv4 mounted on fileid > 32bits (%zu occurrences)\n",
+ count64mountfileid);
+ count64mountfileid = 0;
+ }
+ }
nap->na_mntonfileno = thyp;
}
attrsum += NFSX_HYPER;
More information about the svn-src-all
mailing list