Date: Sat, 21 May 2016 20:50:26 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r300379 - stable/10/sys/fs/nfsserver Message-ID: <201605212050.u4LKoQPG082954@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Sat May 21 20:50:25 2016 New Revision: 300379 URL: https://svnweb.freebsd.org/changeset/base/300379 Log: MFC: r299226 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. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c Sat May 21 19:54:10 2016 (r300378) +++ stable/10/sys/fs/nfsserver/nfs_nfsdsocket.c Sat May 21 20:50:25 2016 (r300379) @@ -771,7 +771,12 @@ nfsrvd_compound(struct nfsrv_descript *n } 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605212050.u4LKoQPG082954>