summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsserver
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2016-05-07 22:45:08 +0000
committerrmacklem <rmacklem@FreeBSD.org>2016-05-07 22:45:08 +0000
commit2f51e8d0c7f41c6ba51ff77fe97ab636e4683b2a (patch)
tree4386081a14266e865f74996bb7b6978ff11f1cb9 /sys/fs/nfsserver
parent15411e495d00a440fc8abc23ffa7dd4dc587326a (diff)
downloadFreeBSD-src-2f51e8d0c7f41c6ba51ff77fe97ab636e4683b2a.zip
FreeBSD-src-2f51e8d0c7f41c6ba51ff77fe97ab636e4683b2a.tar.gz
Don't increment srvrpccnt[] for the NFSv4.1 operations.
When support for NFSv4.1 was added to the NFS server, it broke the server rpc count stats, since newnfsstats.srvrpccnt[] doesn't have entries for the new NFSv4.1 operations. Without this patch, the code was incrementing bogus entries in newnfsstats for the new NFSv4.1 operations. This patch is an interim fix. The nfsstats structure needs to be updated and that will come in a future commit. Reported by: cem MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsserver')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdsocket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c
index 4e995c1..e09116c 100644
--- a/sys/fs/nfsserver/nfs_nfsdsocket.c
+++ b/sys/fs/nfsserver/nfs_nfsdsocket.c
@@ -771,7 +771,12 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag,
}
if (nfsv4_opflag[op].savereply)
nd->nd_flag |= ND_SAVEREPLY;
- NFSINCRGLOBAL(newnfsstats.srvrpccnt[nd->nd_procnum]);
+ /*
+ * For now, newnfsstats.srvrpccnt[] doesn't have entries
+ * for the NFSv4.1 operations.
+ */
+ if (nd->nd_procnum < NFSV4OP_NOPS)
+ NFSINCRGLOBAL(newnfsstats.srvrpccnt[nd->nd_procnum]);
switch (op) {
case NFSV4OP_PUTFH:
error = nfsrv_mtofh(nd, &fh);
OpenPOWER on IntegriCloud