1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

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
This commit is contained in:
Rick Macklem 2016-05-07 22:45:08 +00:00
parent dbc0cf500d
commit de2413b95e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299226

View File

@ -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);