svn commit: r367785 - in head/sys: fs/nfs nfsserver
Alan Somers
asomers at FreeBSD.org
Wed Nov 18 04:35:51 UTC 2020
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;
More information about the svn-src-head
mailing list