summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-01-09 12:11:05 -0200
committerRenato Botelho <renato@netgate.com>2017-01-09 12:11:05 -0200
commit681a482d8fc4bfc14a24f7a9d75cca6337f2a520 (patch)
tree08368e0c4dcea4baa16f4a34b2cc104c42e1ed27 /sys/fs/nfs
parentcbeab2a9b6b7ac70992175202f35fcc05a5821d5 (diff)
parent91f6edbb8913d163d5c16fb615e84baf8a16d390 (diff)
downloadFreeBSD-src-681a482d8fc4bfc14a24f7a9d75cca6337f2a520.zip
FreeBSD-src-681a482d8fc4bfc14a24f7a9d75cca6337f2a520.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/fs/nfs')
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 7d45673..60615cd 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -827,6 +827,11 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
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, vnode_t vp,
*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, vnode_t vp,
}
}
} 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;
OpenPOWER on IntegriCloud