From owner-svn-src-head@freebsd.org Wed Nov 18 04:35:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F41C82E0FE3; Wed, 18 Nov 2020 04:35:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CbVP26bQdz4dyR; Wed, 18 Nov 2020 04:35:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D52A04067; Wed, 18 Nov 2020 04:35:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0AI4ZoET043956; Wed, 18 Nov 2020 04:35:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AI4ZoFu043953; Wed, 18 Nov 2020 04:35:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202011180435.0AI4ZoFu043953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 18 Nov 2020 04:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367785 - in head/sys: fs/nfs nfsserver X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/sys: fs/nfs nfsserver X-SVN-Commit-Revision: 367785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2020 04:35:51 -0000 Author: asomers Date: Wed Nov 18 04:35:49 2020 New Revision: 367785 URL: https://svnweb.freebsd.org/changeset/base/367785 Log: nfs: Mark unused statistics variable as reserved FreeBSD's NFS exporter has long exported some unused statistics fields. Revision r366992 removed them from nfsstat. This revision renames those fields in the kernel's exported structures to make it clear to other consumers that they are unused. Reported by: emaste Reviewed by: emaste Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D27258 Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfsport.h head/sys/nfsserver/nfsrvstats.h Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Wed Nov 18 03:43:03 2020 (r367784) +++ head/sys/fs/nfs/nfs_commonport.c Wed Nov 18 04:35:49 2020 (r367785) @@ -541,16 +541,15 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++) oldnfsstats.srvrpccnt[j] = nfsstatsv1.srvrpccnt[i]; - oldnfsstats.srvrpc_errs = nfsstatsv1.srvrpc_errs; - oldnfsstats.srv_errs = nfsstatsv1.srv_errs; + oldnfsstats.reserved_0 = 0; + oldnfsstats.reserved_1 = 0; oldnfsstats.rpcrequests = nfsstatsv1.rpcrequests; oldnfsstats.rpctimeouts = nfsstatsv1.rpctimeouts; oldnfsstats.rpcunexpected = nfsstatsv1.rpcunexpected; oldnfsstats.rpcinvalid = nfsstatsv1.rpcinvalid; oldnfsstats.srvcache_inproghits = nfsstatsv1.srvcache_inproghits; - oldnfsstats.srvcache_idemdonehits = - nfsstatsv1.srvcache_idemdonehits; + oldnfsstats.reserved_2 = 0; oldnfsstats.srvcache_nonidemdonehits = nfsstatsv1.srvcache_nonidemdonehits; oldnfsstats.srvcache_misses = @@ -636,10 +635,8 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, i++, j++) nfsstatsov1.srvrpccnt[j] = nfsstatsv1.srvrpccnt[i]; - nfsstatsov1.srvrpc_errs = - nfsstatsv1.srvrpc_errs; - nfsstatsov1.srv_errs = - nfsstatsv1.srv_errs; + nfsstatsov1.reserved_0 = 0; + nfsstatsov1.reserved_1 = 0; nfsstatsov1.rpcrequests = nfsstatsv1.rpcrequests; nfsstatsov1.rpctimeouts = @@ -650,8 +647,7 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, nfsstatsv1.rpcinvalid; nfsstatsov1.srvcache_inproghits = nfsstatsv1.srvcache_inproghits; - nfsstatsov1.srvcache_idemdonehits = - nfsstatsv1.srvcache_idemdonehits; + nfsstatsov1.reserved_2 = 0; nfsstatsov1.srvcache_nonidemdonehits = nfsstatsv1.srvcache_nonidemdonehits; nfsstatsov1.srvcache_misses = @@ -750,10 +746,7 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, sizeof(nfsstatsv1.rpccnt)); } if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) { - nfsstatsv1.srvrpc_errs = 0; - nfsstatsv1.srv_errs = 0; nfsstatsv1.srvcache_inproghits = 0; - nfsstatsv1.srvcache_idemdonehits = 0; nfsstatsv1.srvcache_nonidemdonehits = 0; nfsstatsv1.srvcache_misses = 0; nfsstatsv1.srvcache_tcppeak = 0; Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Wed Nov 18 03:43:03 2020 (r367784) +++ head/sys/fs/nfs/nfsport.h Wed Nov 18 04:35:49 2020 (r367785) @@ -447,14 +447,14 @@ struct nfsstatsv1 { uint64_t rpccnt[NFSV42_NPROCS + 15]; uint64_t rpcretries; uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS + 15]; - uint64_t srvrpc_errs; - uint64_t srv_errs; + uint64_t reserved_0; + uint64_t reserved_1; uint64_t rpcrequests; uint64_t rpctimeouts; uint64_t rpcunexpected; uint64_t rpcinvalid; uint64_t srvcache_inproghits; - uint64_t srvcache_idemdonehits; + uint64_t reserved_2; uint64_t srvcache_nonidemdonehits; uint64_t srvcache_misses; uint64_t srvcache_tcppeak; @@ -512,14 +512,14 @@ struct nfsstatsov1 { uint64_t rpccnt[NFSV42_NPROCS + 4]; uint64_t rpcretries; uint64_t srvrpccnt[NFSV42_PURENOPS + NFSV4OP_FAKENOPS]; - uint64_t srvrpc_errs; - uint64_t srv_errs; + uint64_t reserved_0; + uint64_t reserved_1; uint64_t rpcrequests; uint64_t rpctimeouts; uint64_t rpcunexpected; uint64_t rpcinvalid; uint64_t srvcache_inproghits; - uint64_t srvcache_idemdonehits; + uint64_t reserved_2; uint64_t srvcache_nonidemdonehits; uint64_t srvcache_misses; uint64_t srvcache_tcppeak; @@ -574,14 +574,14 @@ struct ext_nfsstats { int rpccnt[NFSV4_NPROCS]; int rpcretries; int srvrpccnt[NFSV4OP_NOPS + NFSV4OP_FAKENOPS]; - int srvrpc_errs; - int srv_errs; + int reserved_0; + int reserved_1; int rpcrequests; int rpctimeouts; int rpcunexpected; int rpcinvalid; int srvcache_inproghits; - int srvcache_idemdonehits; + int reserved_2; int srvcache_nonidemdonehits; int srvcache_misses; int srvcache_tcppeak; Modified: head/sys/nfsserver/nfsrvstats.h ============================================================================== --- head/sys/nfsserver/nfsrvstats.h Wed Nov 18 03:43:03 2020 (r367784) +++ head/sys/nfsserver/nfsrvstats.h Wed Nov 18 04:35:49 2020 (r367785) @@ -42,10 +42,10 @@ * Server stats structure */ struct nfsrvstats { - int srvrpc_errs; - int srv_errs; + int reserved_0; + int reserved_1; int srvcache_inproghits; - int srvcache_idemdonehits; + int reserved_2; int srvcache_nonidemdonehits; int srvcache_misses; int srvvop_writes;