nfsd: Wrap nfsstatsv1_p in the NFSD_VNET() macro
Commit 7344856e3a6d added a lot of macros that will front end vnet macros so that nfsd(8) can run in vnet prison. The nfsstatsv1_p variable got missed. This patch wraps all uses of nfsstatsv1_p with the NFSD_VNET() macro. The NFSD_VNET() macro is still a null macro. MFC after: 3 months
This commit is contained in:
parent
5016d112ad
commit
b039ca0776
@ -783,7 +783,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
procnum = NFSV4PROC_COMPOUND;
|
||||
|
||||
if (nmp != NULL) {
|
||||
NFSINCRGLOBAL(nfsstatsv1_p->rpcrequests);
|
||||
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcrequests);
|
||||
|
||||
/* Map the procnum to the old NFSv2 one, as required. */
|
||||
if ((nd->nd_flag & ND_NFSV2) != 0) {
|
||||
@ -918,13 +918,13 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
if (stat == RPC_SUCCESS) {
|
||||
error = 0;
|
||||
} else if (stat == RPC_TIMEDOUT) {
|
||||
NFSINCRGLOBAL(nfsstatsv1_p->rpctimeouts);
|
||||
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpctimeouts);
|
||||
error = ETIMEDOUT;
|
||||
} else if (stat == RPC_VERSMISMATCH) {
|
||||
NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid);
|
||||
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
|
||||
error = EOPNOTSUPP;
|
||||
} else if (stat == RPC_PROGVERSMISMATCH) {
|
||||
NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid);
|
||||
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
|
||||
error = EPROTONOSUPPORT;
|
||||
} else if (stat == RPC_CANTSEND || stat == RPC_CANTRECV ||
|
||||
stat == RPC_SYSTEMERROR || stat == RPC_INTR) {
|
||||
@ -958,11 +958,11 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
if (stat == RPC_INTR)
|
||||
error = EINTR;
|
||||
else {
|
||||
NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid);
|
||||
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
|
||||
error = ENXIO;
|
||||
}
|
||||
} else {
|
||||
NFSINCRGLOBAL(nfsstatsv1_p->rpcinvalid);
|
||||
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
|
||||
error = EACCES;
|
||||
}
|
||||
if (error) {
|
||||
|
@ -478,87 +478,105 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
|
||||
if ((uap->flag & NFSSVC_NEWSTRUCT) == 0) {
|
||||
/* Copy fields to the old ext_nfsstat structure. */
|
||||
oldnfsstats.attrcache_hits =
|
||||
nfsstatsv1_p->attrcache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->attrcache_hits;
|
||||
oldnfsstats.attrcache_misses =
|
||||
nfsstatsv1_p->attrcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->attrcache_misses;
|
||||
oldnfsstats.lookupcache_hits =
|
||||
nfsstatsv1_p->lookupcache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->lookupcache_hits;
|
||||
oldnfsstats.lookupcache_misses =
|
||||
nfsstatsv1_p->lookupcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->lookupcache_misses;
|
||||
oldnfsstats.direofcache_hits =
|
||||
nfsstatsv1_p->direofcache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->direofcache_hits;
|
||||
oldnfsstats.direofcache_misses =
|
||||
nfsstatsv1_p->direofcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->direofcache_misses;
|
||||
oldnfsstats.accesscache_hits =
|
||||
nfsstatsv1_p->accesscache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->accesscache_hits;
|
||||
oldnfsstats.accesscache_misses =
|
||||
nfsstatsv1_p->accesscache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->accesscache_misses;
|
||||
oldnfsstats.biocache_reads =
|
||||
nfsstatsv1_p->biocache_reads;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_reads;
|
||||
oldnfsstats.read_bios =
|
||||
nfsstatsv1_p->read_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->read_bios;
|
||||
oldnfsstats.read_physios =
|
||||
nfsstatsv1_p->read_physios;
|
||||
NFSD_VNET(nfsstatsv1_p)->read_physios;
|
||||
oldnfsstats.biocache_writes =
|
||||
nfsstatsv1_p->biocache_writes;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_writes;
|
||||
oldnfsstats.write_bios =
|
||||
nfsstatsv1_p->write_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->write_bios;
|
||||
oldnfsstats.write_physios =
|
||||
nfsstatsv1_p->write_physios;
|
||||
NFSD_VNET(nfsstatsv1_p)->write_physios;
|
||||
oldnfsstats.biocache_readlinks =
|
||||
nfsstatsv1_p->biocache_readlinks;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_readlinks;
|
||||
oldnfsstats.readlink_bios =
|
||||
nfsstatsv1_p->readlink_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->readlink_bios;
|
||||
oldnfsstats.biocache_readdirs =
|
||||
nfsstatsv1_p->biocache_readdirs;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_readdirs;
|
||||
oldnfsstats.readdir_bios =
|
||||
nfsstatsv1_p->readdir_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->readdir_bios;
|
||||
for (i = 0; i < NFSV4_NPROCS; i++)
|
||||
oldnfsstats.rpccnt[i] = nfsstatsv1_p->rpccnt[i];
|
||||
oldnfsstats.rpcretries = nfsstatsv1_p->rpcretries;
|
||||
oldnfsstats.rpccnt[i] =
|
||||
NFSD_VNET(nfsstatsv1_p)->rpccnt[i];
|
||||
oldnfsstats.rpcretries =
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcretries;
|
||||
for (i = 0; i < NFSV4OP_NOPS; i++)
|
||||
oldnfsstats.srvrpccnt[i] =
|
||||
nfsstatsv1_p->srvrpccnt[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i];
|
||||
for (i = NFSV42_NOPS, j = NFSV4OP_NOPS;
|
||||
i < NFSV42_NOPS + NFSV4OP_FAKENOPS; i++, j++)
|
||||
oldnfsstats.srvrpccnt[j] =
|
||||
nfsstatsv1_p->srvrpccnt[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i];
|
||||
oldnfsstats.reserved_0 = 0;
|
||||
oldnfsstats.reserved_1 = 0;
|
||||
oldnfsstats.rpcrequests = nfsstatsv1_p->rpcrequests;
|
||||
oldnfsstats.rpctimeouts = nfsstatsv1_p->rpctimeouts;
|
||||
oldnfsstats.rpcunexpected = nfsstatsv1_p->rpcunexpected;
|
||||
oldnfsstats.rpcinvalid = nfsstatsv1_p->rpcinvalid;
|
||||
oldnfsstats.rpcrequests =
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcrequests;
|
||||
oldnfsstats.rpctimeouts =
|
||||
NFSD_VNET(nfsstatsv1_p)->rpctimeouts;
|
||||
oldnfsstats.rpcunexpected =
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcunexpected;
|
||||
oldnfsstats.rpcinvalid =
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcinvalid;
|
||||
oldnfsstats.srvcache_inproghits =
|
||||
nfsstatsv1_p->srvcache_inproghits;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits;
|
||||
oldnfsstats.reserved_2 = 0;
|
||||
oldnfsstats.srvcache_nonidemdonehits =
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits;
|
||||
oldnfsstats.srvcache_misses =
|
||||
nfsstatsv1_p->srvcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_misses;
|
||||
oldnfsstats.srvcache_tcppeak =
|
||||
nfsstatsv1_p->srvcache_tcppeak;
|
||||
oldnfsstats.srvcache_size = nfsstatsv1_p->srvcache_size;
|
||||
oldnfsstats.srvclients = nfsstatsv1_p->srvclients;
|
||||
oldnfsstats.srvopenowners = nfsstatsv1_p->srvopenowners;
|
||||
oldnfsstats.srvopens = nfsstatsv1_p->srvopens;
|
||||
oldnfsstats.srvlockowners = nfsstatsv1_p->srvlockowners;
|
||||
oldnfsstats.srvlocks = nfsstatsv1_p->srvlocks;
|
||||
oldnfsstats.srvdelegates = nfsstatsv1_p->srvdelegates;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak;
|
||||
oldnfsstats.srvcache_size =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_size;
|
||||
oldnfsstats.srvclients =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvclients;
|
||||
oldnfsstats.srvopenowners =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopenowners;
|
||||
oldnfsstats.srvopens =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopens;
|
||||
oldnfsstats.srvlockowners =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlockowners;
|
||||
oldnfsstats.srvlocks =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlocks;
|
||||
oldnfsstats.srvdelegates =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdelegates;
|
||||
for (i = 0; i < NFSV4OP_CBNOPS; i++)
|
||||
oldnfsstats.cbrpccnt[i] =
|
||||
nfsstatsv1_p->cbrpccnt[i];
|
||||
oldnfsstats.clopenowners = nfsstatsv1_p->clopenowners;
|
||||
oldnfsstats.clopens = nfsstatsv1_p->clopens;
|
||||
oldnfsstats.cllockowners = nfsstatsv1_p->cllockowners;
|
||||
oldnfsstats.cllocks = nfsstatsv1_p->cllocks;
|
||||
oldnfsstats.cldelegates = nfsstatsv1_p->cldelegates;
|
||||
NFSD_VNET(nfsstatsv1_p)->cbrpccnt[i];
|
||||
oldnfsstats.clopenowners =
|
||||
NFSD_VNET(nfsstatsv1_p)->clopenowners;
|
||||
oldnfsstats.clopens = NFSD_VNET(nfsstatsv1_p)->clopens;
|
||||
oldnfsstats.cllockowners =
|
||||
NFSD_VNET(nfsstatsv1_p)->cllockowners;
|
||||
oldnfsstats.cllocks = NFSD_VNET(nfsstatsv1_p)->cllocks;
|
||||
oldnfsstats.cldelegates =
|
||||
NFSD_VNET(nfsstatsv1_p)->cldelegates;
|
||||
oldnfsstats.cllocalopenowners =
|
||||
nfsstatsv1_p->cllocalopenowners;
|
||||
oldnfsstats.cllocalopens = nfsstatsv1_p->cllocalopens;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocalopenowners;
|
||||
oldnfsstats.cllocalopens =
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocalopens;
|
||||
oldnfsstats.cllocallockowners =
|
||||
nfsstatsv1_p->cllocallockowners;
|
||||
oldnfsstats.cllocallocks = nfsstatsv1_p->cllocallocks;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocallockowners;
|
||||
oldnfsstats.cllocallocks =
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocallocks;
|
||||
error = copyout(&oldnfsstats, uap->argp,
|
||||
sizeof (oldnfsstats));
|
||||
} else {
|
||||
@ -568,174 +586,174 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
|
||||
if (nfsstatver.vers == NFSSTATS_OV1) {
|
||||
/* Copy nfsstatsv1 to nfsstatsov1. */
|
||||
nfsstatsov1.attrcache_hits =
|
||||
nfsstatsv1_p->attrcache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->attrcache_hits;
|
||||
nfsstatsov1.attrcache_misses =
|
||||
nfsstatsv1_p->attrcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->attrcache_misses;
|
||||
nfsstatsov1.lookupcache_hits =
|
||||
nfsstatsv1_p->lookupcache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->lookupcache_hits;
|
||||
nfsstatsov1.lookupcache_misses =
|
||||
nfsstatsv1_p->lookupcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->lookupcache_misses;
|
||||
nfsstatsov1.direofcache_hits =
|
||||
nfsstatsv1_p->direofcache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->direofcache_hits;
|
||||
nfsstatsov1.direofcache_misses =
|
||||
nfsstatsv1_p->direofcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->direofcache_misses;
|
||||
nfsstatsov1.accesscache_hits =
|
||||
nfsstatsv1_p->accesscache_hits;
|
||||
NFSD_VNET(nfsstatsv1_p)->accesscache_hits;
|
||||
nfsstatsov1.accesscache_misses =
|
||||
nfsstatsv1_p->accesscache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->accesscache_misses;
|
||||
nfsstatsov1.biocache_reads =
|
||||
nfsstatsv1_p->biocache_reads;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_reads;
|
||||
nfsstatsov1.read_bios =
|
||||
nfsstatsv1_p->read_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->read_bios;
|
||||
nfsstatsov1.read_physios =
|
||||
nfsstatsv1_p->read_physios;
|
||||
NFSD_VNET(nfsstatsv1_p)->read_physios;
|
||||
nfsstatsov1.biocache_writes =
|
||||
nfsstatsv1_p->biocache_writes;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_writes;
|
||||
nfsstatsov1.write_bios =
|
||||
nfsstatsv1_p->write_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->write_bios;
|
||||
nfsstatsov1.write_physios =
|
||||
nfsstatsv1_p->write_physios;
|
||||
NFSD_VNET(nfsstatsv1_p)->write_physios;
|
||||
nfsstatsov1.biocache_readlinks =
|
||||
nfsstatsv1_p->biocache_readlinks;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_readlinks;
|
||||
nfsstatsov1.readlink_bios =
|
||||
nfsstatsv1_p->readlink_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->readlink_bios;
|
||||
nfsstatsov1.biocache_readdirs =
|
||||
nfsstatsv1_p->biocache_readdirs;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_readdirs;
|
||||
nfsstatsov1.readdir_bios =
|
||||
nfsstatsv1_p->readdir_bios;
|
||||
NFSD_VNET(nfsstatsv1_p)->readdir_bios;
|
||||
for (i = 0; i < NFSV42_OLDNPROCS; i++)
|
||||
nfsstatsov1.rpccnt[i] =
|
||||
nfsstatsv1_p->rpccnt[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->rpccnt[i];
|
||||
nfsstatsov1.rpcretries =
|
||||
nfsstatsv1_p->rpcretries;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcretries;
|
||||
for (i = 0; i < NFSV42_PURENOPS; i++)
|
||||
nfsstatsov1.srvrpccnt[i] =
|
||||
nfsstatsv1_p->srvrpccnt[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i];
|
||||
for (i = NFSV42_NOPS,
|
||||
j = NFSV42_PURENOPS;
|
||||
i < NFSV42_NOPS + NFSV4OP_FAKENOPS;
|
||||
i++, j++)
|
||||
nfsstatsov1.srvrpccnt[j] =
|
||||
nfsstatsv1_p->srvrpccnt[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->srvrpccnt[i];
|
||||
nfsstatsov1.reserved_0 = 0;
|
||||
nfsstatsov1.reserved_1 = 0;
|
||||
nfsstatsov1.rpcrequests =
|
||||
nfsstatsv1_p->rpcrequests;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcrequests;
|
||||
nfsstatsov1.rpctimeouts =
|
||||
nfsstatsv1_p->rpctimeouts;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpctimeouts;
|
||||
nfsstatsov1.rpcunexpected =
|
||||
nfsstatsv1_p->rpcunexpected;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcunexpected;
|
||||
nfsstatsov1.rpcinvalid =
|
||||
nfsstatsv1_p->rpcinvalid;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcinvalid;
|
||||
nfsstatsov1.srvcache_inproghits =
|
||||
nfsstatsv1_p->srvcache_inproghits;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits;
|
||||
nfsstatsov1.reserved_2 = 0;
|
||||
nfsstatsov1.srvcache_nonidemdonehits =
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits;
|
||||
nfsstatsov1.srvcache_misses =
|
||||
nfsstatsv1_p->srvcache_misses;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_misses;
|
||||
nfsstatsov1.srvcache_tcppeak =
|
||||
nfsstatsv1_p->srvcache_tcppeak;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak;
|
||||
nfsstatsov1.srvcache_size =
|
||||
nfsstatsv1_p->srvcache_size;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_size;
|
||||
nfsstatsov1.srvclients =
|
||||
nfsstatsv1_p->srvclients;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvclients;
|
||||
nfsstatsov1.srvopenowners =
|
||||
nfsstatsv1_p->srvopenowners;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopenowners;
|
||||
nfsstatsov1.srvopens =
|
||||
nfsstatsv1_p->srvopens;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopens;
|
||||
nfsstatsov1.srvlockowners =
|
||||
nfsstatsv1_p->srvlockowners;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlockowners;
|
||||
nfsstatsov1.srvlocks =
|
||||
nfsstatsv1_p->srvlocks;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlocks;
|
||||
nfsstatsov1.srvdelegates =
|
||||
nfsstatsv1_p->srvdelegates;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdelegates;
|
||||
for (i = 0; i < NFSV42_CBNOPS; i++)
|
||||
nfsstatsov1.cbrpccnt[i] =
|
||||
nfsstatsv1_p->cbrpccnt[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->cbrpccnt[i];
|
||||
nfsstatsov1.clopenowners =
|
||||
nfsstatsv1_p->clopenowners;
|
||||
NFSD_VNET(nfsstatsv1_p)->clopenowners;
|
||||
nfsstatsov1.clopens =
|
||||
nfsstatsv1_p->clopens;
|
||||
NFSD_VNET(nfsstatsv1_p)->clopens;
|
||||
nfsstatsov1.cllockowners =
|
||||
nfsstatsv1_p->cllockowners;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllockowners;
|
||||
nfsstatsov1.cllocks =
|
||||
nfsstatsv1_p->cllocks;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocks;
|
||||
nfsstatsov1.cldelegates =
|
||||
nfsstatsv1_p->cldelegates;
|
||||
NFSD_VNET(nfsstatsv1_p)->cldelegates;
|
||||
nfsstatsov1.cllocalopenowners =
|
||||
nfsstatsv1_p->cllocalopenowners;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocalopenowners;
|
||||
nfsstatsov1.cllocalopens =
|
||||
nfsstatsv1_p->cllocalopens;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocalopens;
|
||||
nfsstatsov1.cllocallockowners =
|
||||
nfsstatsv1_p->cllocallockowners;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocallockowners;
|
||||
nfsstatsov1.cllocallocks =
|
||||
nfsstatsv1_p->cllocallocks;
|
||||
NFSD_VNET(nfsstatsv1_p)->cllocallocks;
|
||||
nfsstatsov1.srvstartcnt =
|
||||
nfsstatsv1_p->srvstartcnt;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvstartcnt;
|
||||
nfsstatsov1.srvdonecnt =
|
||||
nfsstatsv1_p->srvdonecnt;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdonecnt;
|
||||
for (i = NFSV42_NOPS,
|
||||
j = NFSV42_PURENOPS;
|
||||
i < NFSV42_NOPS + NFSV4OP_FAKENOPS;
|
||||
i++, j++) {
|
||||
nfsstatsov1.srvbytes[j] =
|
||||
nfsstatsv1_p->srvbytes[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->srvbytes[i];
|
||||
nfsstatsov1.srvops[j] =
|
||||
nfsstatsv1_p->srvops[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->srvops[i];
|
||||
nfsstatsov1.srvduration[j] =
|
||||
nfsstatsv1_p->srvduration[i];
|
||||
NFSD_VNET(nfsstatsv1_p)->srvduration[i];
|
||||
}
|
||||
nfsstatsov1.busyfrom =
|
||||
nfsstatsv1_p->busyfrom;
|
||||
NFSD_VNET(nfsstatsv1_p)->busyfrom;
|
||||
nfsstatsov1.busyfrom =
|
||||
nfsstatsv1_p->busyfrom;
|
||||
NFSD_VNET(nfsstatsv1_p)->busyfrom;
|
||||
error = copyout(&nfsstatsov1, uap->argp,
|
||||
sizeof(nfsstatsov1));
|
||||
} else if (nfsstatver.vers != NFSSTATS_V1)
|
||||
error = EPERM;
|
||||
else
|
||||
error = copyout(&nfsstatsv1, uap->argp,
|
||||
sizeof(nfsstatsv1));
|
||||
error = copyout(NFSD_VNET(nfsstatsv1_p),
|
||||
uap->argp, sizeof(nfsstatsv1));
|
||||
}
|
||||
}
|
||||
if (error == 0) {
|
||||
if ((uap->flag & NFSSVC_ZEROCLTSTATS) != 0) {
|
||||
nfsstatsv1_p->attrcache_hits = 0;
|
||||
nfsstatsv1_p->attrcache_misses = 0;
|
||||
nfsstatsv1_p->lookupcache_hits = 0;
|
||||
nfsstatsv1_p->lookupcache_misses = 0;
|
||||
nfsstatsv1_p->direofcache_hits = 0;
|
||||
nfsstatsv1_p->direofcache_misses = 0;
|
||||
nfsstatsv1_p->accesscache_hits = 0;
|
||||
nfsstatsv1_p->accesscache_misses = 0;
|
||||
nfsstatsv1_p->biocache_reads = 0;
|
||||
nfsstatsv1_p->read_bios = 0;
|
||||
nfsstatsv1_p->read_physios = 0;
|
||||
nfsstatsv1_p->biocache_writes = 0;
|
||||
nfsstatsv1_p->write_bios = 0;
|
||||
nfsstatsv1_p->write_physios = 0;
|
||||
nfsstatsv1_p->biocache_readlinks = 0;
|
||||
nfsstatsv1_p->readlink_bios = 0;
|
||||
nfsstatsv1_p->biocache_readdirs = 0;
|
||||
nfsstatsv1_p->readdir_bios = 0;
|
||||
nfsstatsv1_p->rpcretries = 0;
|
||||
nfsstatsv1_p->rpcrequests = 0;
|
||||
nfsstatsv1_p->rpctimeouts = 0;
|
||||
nfsstatsv1_p->rpcunexpected = 0;
|
||||
nfsstatsv1_p->rpcinvalid = 0;
|
||||
bzero(nfsstatsv1_p->rpccnt,
|
||||
sizeof(nfsstatsv1_p->rpccnt));
|
||||
NFSD_VNET(nfsstatsv1_p)->attrcache_hits = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->attrcache_misses = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->lookupcache_hits = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->lookupcache_misses = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->direofcache_hits = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->direofcache_misses = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->accesscache_hits = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->accesscache_misses = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_reads = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->read_bios = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->read_physios = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_writes = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->write_bios = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->write_physios = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_readlinks = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->readlink_bios = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->biocache_readdirs = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->readdir_bios = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcretries = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcrequests = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpctimeouts = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcunexpected = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->rpcinvalid = 0;
|
||||
bzero(NFSD_VNET(nfsstatsv1_p)->rpccnt,
|
||||
sizeof(NFSD_VNET(nfsstatsv1_p)->rpccnt));
|
||||
}
|
||||
if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) {
|
||||
nfsstatsv1_p->srvcache_inproghits = 0;
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits = 0;
|
||||
nfsstatsv1_p->srvcache_misses = 0;
|
||||
nfsstatsv1_p->srvcache_tcppeak = 0;
|
||||
bzero(nfsstatsv1_p->srvrpccnt,
|
||||
sizeof(nfsstatsv1_p->srvrpccnt));
|
||||
bzero(nfsstatsv1_p->cbrpccnt,
|
||||
sizeof(nfsstatsv1_p->cbrpccnt));
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_misses = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak = 0;
|
||||
bzero(NFSD_VNET(nfsstatsv1_p)->srvrpccnt,
|
||||
sizeof(NFSD_VNET(nfsstatsv1_p)->srvrpccnt));
|
||||
bzero(NFSD_VNET(nfsstatsv1_p)->cbrpccnt,
|
||||
sizeof(NFSD_VNET(nfsstatsv1_p)->cbrpccnt));
|
||||
}
|
||||
}
|
||||
goto out;
|
||||
|
@ -404,14 +404,14 @@ nfsrc_getudp(struct nfsrv_descript *nd, struct nfsrvcache *newrp)
|
||||
TAILQ_REMOVE(&NFSD_VNET(nfsrvudplru), rp, rc_lru);
|
||||
TAILQ_INSERT_TAIL(&NFSD_VNET(nfsrvudplru), rp, rc_lru);
|
||||
if (rp->rc_flag & RC_INPROG) {
|
||||
nfsstatsv1_p->srvcache_inproghits++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits++;
|
||||
mtx_unlock(mutex);
|
||||
ret = RC_DROPIT;
|
||||
} else if (rp->rc_flag & RC_REPSTATUS) {
|
||||
/*
|
||||
* V2 only.
|
||||
*/
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++;
|
||||
mtx_unlock(mutex);
|
||||
nfsrvd_rephead(nd);
|
||||
*(nd->nd_errp) = rp->rc_status;
|
||||
@ -419,7 +419,7 @@ nfsrc_getudp(struct nfsrv_descript *nd, struct nfsrvcache *newrp)
|
||||
rp->rc_timestamp = NFSD_MONOSEC +
|
||||
NFSRVCACHE_UDPTIMEOUT;
|
||||
} else if (rp->rc_flag & RC_REPMBUF) {
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++;
|
||||
mtx_unlock(mutex);
|
||||
nd->nd_mreq = m_copym(rp->rc_reply, 0,
|
||||
M_COPYALL, M_WAITOK);
|
||||
@ -434,8 +434,8 @@ nfsrc_getudp(struct nfsrv_descript *nd, struct nfsrvcache *newrp)
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
nfsstatsv1_p->srvcache_misses++;
|
||||
atomic_add_int(&nfsstatsv1_p->srvcache_size, 1);
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_misses++;
|
||||
atomic_add_int(&NFSD_VNET(nfsstatsv1_p)->srvcache_size, 1);
|
||||
NFSD_VNET(nfsrc_udpcachesize)++;
|
||||
|
||||
newrp->rc_flag |= RC_INPROG;
|
||||
@ -489,7 +489,7 @@ nfsrvd_updatecache(struct nfsrv_descript *nd)
|
||||
* Reply from cache is a special case returned by nfsrv_checkseqid().
|
||||
*/
|
||||
if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) {
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++;
|
||||
mtx_unlock(mutex);
|
||||
nd->nd_repstat = 0;
|
||||
if (nd->nd_mreq)
|
||||
@ -529,8 +529,8 @@ nfsrvd_updatecache(struct nfsrv_descript *nd)
|
||||
atomic_add_int(&NFSD_VNET(nfsrc_tcpsavedreplies),
|
||||
1);
|
||||
if (NFSD_VNET(nfsrc_tcpsavedreplies) >
|
||||
nfsstatsv1_p->srvcache_tcppeak)
|
||||
nfsstatsv1_p->srvcache_tcppeak =
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak)
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_tcppeak =
|
||||
NFSD_VNET(nfsrc_tcpsavedreplies);
|
||||
}
|
||||
mtx_unlock(mutex);
|
||||
@ -688,7 +688,7 @@ nfsrc_gettcp(struct nfsrv_descript *nd, struct nfsrvcache *newrp)
|
||||
panic("nfs tcp cache0");
|
||||
rp->rc_flag |= RC_LOCKED;
|
||||
if (rp->rc_flag & RC_INPROG) {
|
||||
nfsstatsv1_p->srvcache_inproghits++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_inproghits++;
|
||||
mtx_unlock(mutex);
|
||||
if (newrp->rc_sockref == rp->rc_sockref)
|
||||
nfsrc_marksametcpconn(rp->rc_sockref);
|
||||
@ -697,7 +697,7 @@ nfsrc_gettcp(struct nfsrv_descript *nd, struct nfsrvcache *newrp)
|
||||
/*
|
||||
* V2 only.
|
||||
*/
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++;
|
||||
mtx_unlock(mutex);
|
||||
if (newrp->rc_sockref == rp->rc_sockref)
|
||||
nfsrc_marksametcpconn(rp->rc_sockref);
|
||||
@ -706,7 +706,7 @@ nfsrc_gettcp(struct nfsrv_descript *nd, struct nfsrvcache *newrp)
|
||||
*(nd->nd_errp) = rp->rc_status;
|
||||
rp->rc_timestamp = NFSD_MONOSEC + nfsrc_tcptimeout;
|
||||
} else if (rp->rc_flag & RC_REPMBUF) {
|
||||
nfsstatsv1_p->srvcache_nonidemdonehits++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_nonidemdonehits++;
|
||||
mtx_unlock(mutex);
|
||||
if (newrp->rc_sockref == rp->rc_sockref)
|
||||
nfsrc_marksametcpconn(rp->rc_sockref);
|
||||
@ -721,8 +721,8 @@ nfsrc_gettcp(struct nfsrv_descript *nd, struct nfsrvcache *newrp)
|
||||
free(newrp, M_NFSRVCACHE);
|
||||
goto out;
|
||||
}
|
||||
nfsstatsv1_p->srvcache_misses++;
|
||||
atomic_add_int(&nfsstatsv1_p->srvcache_size, 1);
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_misses++;
|
||||
atomic_add_int(&NFSD_VNET(nfsstatsv1_p)->srvcache_size, 1);
|
||||
|
||||
/*
|
||||
* For TCP, multiple entries for a key are allowed, so don't
|
||||
@ -811,7 +811,7 @@ nfsrc_freecache(struct nfsrvcache *rp)
|
||||
atomic_add_int(&NFSD_VNET(nfsrc_tcpsavedreplies), -1);
|
||||
}
|
||||
free(rp, M_NFSRVCACHE);
|
||||
atomic_add_int(&nfsstatsv1_p->srvcache_size, -1);
|
||||
atomic_add_int(&NFSD_VNET(nfsstatsv1_p)->srvcache_size, -1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -837,7 +837,7 @@ nfsrvd_cleancache(void)
|
||||
nfsrc_freecache(rp);
|
||||
}
|
||||
}
|
||||
nfsstatsv1_p->srvcache_size = 0;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvcache_size = 0;
|
||||
mtx_unlock(&nfsrc_udpmtx);
|
||||
NFSD_VNET(nfsrc_tcpsavedreplies) = 0;
|
||||
}
|
||||
|
@ -1034,7 +1034,7 @@ nfsvno_read(struct vnode *vp, off_t off, int cnt, struct ucred *cred,
|
||||
nh = nfsrv_sequential_heuristic(uiop, vp);
|
||||
ioflag |= nh->nh_seqcount << IO_SEQSHIFT;
|
||||
/* XXX KDM make this more systematic? */
|
||||
nfsstatsv1_p->srvbytes[NFSV4OP_READ] += uiop->uio_resid;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvbytes[NFSV4OP_READ] += uiop->uio_resid;
|
||||
error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred);
|
||||
free(iv, M_TEMP);
|
||||
if (error) {
|
||||
@ -1159,7 +1159,7 @@ nfsvno_write(struct vnode *vp, off_t off, int retlen, int *stable,
|
||||
nh = nfsrv_sequential_heuristic(uiop, vp);
|
||||
ioflags |= nh->nh_seqcount << IO_SEQSHIFT;
|
||||
/* XXX KDM make this more systematic? */
|
||||
nfsstatsv1_p->srvbytes[NFSV4OP_WRITE] += uiop->uio_resid;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvbytes[NFSV4OP_WRITE] += uiop->uio_resid;
|
||||
error = VOP_WRITE(vp, uiop, ioflags, cred);
|
||||
if (error == 0)
|
||||
nh->nh_nextoff = uiop->uio_offset;
|
||||
|
@ -475,15 +475,16 @@ nfsrvd_statstart(int op, struct bintime *now)
|
||||
}
|
||||
|
||||
mtx_lock(&nfsrvd_statmtx);
|
||||
if (nfsstatsv1_p->srvstartcnt == nfsstatsv1_p->srvdonecnt) {
|
||||
if (NFSD_VNET(nfsstatsv1_p)->srvstartcnt ==
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdonecnt) {
|
||||
if (now != NULL)
|
||||
nfsstatsv1_p->busyfrom = *now;
|
||||
NFSD_VNET(nfsstatsv1_p)->busyfrom = *now;
|
||||
else
|
||||
binuptime(&nfsstatsv1_p->busyfrom);
|
||||
binuptime(&NFSD_VNET(nfsstatsv1_p)->busyfrom);
|
||||
|
||||
}
|
||||
nfsstatsv1_p->srvrpccnt[op]++;
|
||||
nfsstatsv1_p->srvstartcnt++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvrpccnt[op]++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvstartcnt++;
|
||||
mtx_unlock(&nfsrvd_statmtx);
|
||||
|
||||
}
|
||||
@ -506,21 +507,21 @@ nfsrvd_statend(int op, uint64_t bytes, struct bintime *now,
|
||||
|
||||
mtx_lock(&nfsrvd_statmtx);
|
||||
|
||||
nfsstatsv1_p->srvbytes[op] += bytes;
|
||||
nfsstatsv1_p->srvops[op]++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvbytes[op] += bytes;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvops[op]++;
|
||||
|
||||
if (then != NULL) {
|
||||
dt = *now;
|
||||
bintime_sub(&dt, then);
|
||||
bintime_add(&nfsstatsv1_p->srvduration[op], &dt);
|
||||
bintime_add(&NFSD_VNET(nfsstatsv1_p)->srvduration[op], &dt);
|
||||
}
|
||||
|
||||
dt = *now;
|
||||
bintime_sub(&dt, &nfsstatsv1_p->busyfrom);
|
||||
bintime_add(&nfsstatsv1_p->busytime, &dt);
|
||||
nfsstatsv1_p->busyfrom = *now;
|
||||
bintime_sub(&dt, &NFSD_VNET(nfsstatsv1_p)->busyfrom);
|
||||
bintime_add(&NFSD_VNET(nfsstatsv1_p)->busytime, &dt);
|
||||
NFSD_VNET(nfsstatsv1_p)->busyfrom = *now;
|
||||
|
||||
nfsstatsv1_p->srvdonecnt++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdonecnt++;
|
||||
|
||||
mtx_unlock(&nfsrvd_statmtx);
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp,
|
||||
LIST_INIT(&new_clp->lc_stateid[i]);
|
||||
LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp,
|
||||
lc_hash);
|
||||
nfsstatsv1_p->srvclients++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvclients++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsrv_clients++;
|
||||
NFSLOCKV4ROOTMUTEX();
|
||||
@ -492,7 +492,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp,
|
||||
LIST_INIT(&new_clp->lc_session);
|
||||
LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp,
|
||||
lc_hash);
|
||||
nfsstatsv1_p->srvclients++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvclients++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsrv_clients++;
|
||||
NFSLOCKV4ROOTMUTEX();
|
||||
@ -557,7 +557,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp,
|
||||
LIST_INIT(&new_clp->lc_session);
|
||||
LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp,
|
||||
lc_hash);
|
||||
nfsstatsv1_p->srvclients++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvclients++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsrv_clients++;
|
||||
}
|
||||
@ -1404,7 +1404,7 @@ nfsrv_zapclient(struct nfsclient *clp, NFSPROC_T *p)
|
||||
free(clp->lc_stateid, M_NFSDCLIENT);
|
||||
free(clp, M_NFSDCLIENT);
|
||||
NFSLOCKSTATE();
|
||||
nfsstatsv1_p->srvclients--;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvclients--;
|
||||
nfsrv_openpluslock--;
|
||||
nfsrv_clients--;
|
||||
NFSUNLOCKSTATE();
|
||||
@ -1447,7 +1447,7 @@ nfsrv_freedeleg(struct nfsstate *stp)
|
||||
nfsv4_testlock(&lfp->lf_locallock_lck) == 0)
|
||||
nfsrv_freenfslockfile(lfp);
|
||||
free(stp, M_NFSDSTATE);
|
||||
nfsstatsv1_p->srvdelegates--;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdelegates--;
|
||||
nfsrv_openpluslock--;
|
||||
nfsrv_delegatecnt--;
|
||||
}
|
||||
@ -1473,7 +1473,7 @@ nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p)
|
||||
if (stp->ls_op)
|
||||
nfsrvd_derefcache(stp->ls_op);
|
||||
free(stp, M_NFSDSTATE);
|
||||
nfsstatsv1_p->srvopenowners--;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopenowners--;
|
||||
nfsrv_openpluslock--;
|
||||
}
|
||||
|
||||
@ -1523,7 +1523,7 @@ nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p)
|
||||
if (cansleep != 0)
|
||||
NFSUNLOCKSTATE();
|
||||
free(stp, M_NFSDSTATE);
|
||||
nfsstatsv1_p->srvopens--;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopens--;
|
||||
nfsrv_openpluslock--;
|
||||
return (ret);
|
||||
}
|
||||
@ -1542,7 +1542,7 @@ nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep,
|
||||
if (stp->ls_op)
|
||||
nfsrvd_derefcache(stp->ls_op);
|
||||
free(stp, M_NFSDSTATE);
|
||||
nfsstatsv1_p->srvlockowners--;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlockowners--;
|
||||
nfsrv_openpluslock--;
|
||||
}
|
||||
|
||||
@ -1618,7 +1618,7 @@ nfsrv_freenfslock(struct nfslock *lop)
|
||||
|
||||
if (lop->lo_lckfile.le_prev != NULL) {
|
||||
LIST_REMOVE(lop, lo_lckfile);
|
||||
nfsstatsv1_p->srvlocks--;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlocks--;
|
||||
nfsrv_openpluslock--;
|
||||
}
|
||||
LIST_REMOVE(lop, lo_lckowner);
|
||||
@ -2395,7 +2395,7 @@ nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp,
|
||||
LIST_INSERT_HEAD(&stp->ls_open, new_stp, ls_list);
|
||||
*new_lopp = NULL;
|
||||
*new_stpp = NULL;
|
||||
nfsstatsv1_p->srvlockowners++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlockowners++;
|
||||
nfsrv_openpluslock++;
|
||||
}
|
||||
if (filestruct_locked != 0) {
|
||||
@ -3047,12 +3047,12 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
LIST_INSERT_HEAD(&new_stp->ls_open, new_open, ls_list);
|
||||
LIST_INSERT_HEAD(&clp->lc_open, new_stp, ls_list);
|
||||
*new_stpp = NULL;
|
||||
nfsstatsv1_p->srvopenowners++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopenowners++;
|
||||
nfsrv_openpluslock++;
|
||||
}
|
||||
openstp = new_open;
|
||||
new_open = NULL;
|
||||
nfsstatsv1_p->srvopens++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopens++;
|
||||
nfsrv_openpluslock++;
|
||||
break;
|
||||
}
|
||||
@ -3113,7 +3113,7 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt) ||
|
||||
!NFSVNO_DELEGOK(vp))
|
||||
*rflagsp |= NFSV4OPEN_RECALL;
|
||||
nfsstatsv1_p->srvdelegates++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdelegates++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsrv_delegatecnt++;
|
||||
|
||||
@ -3153,12 +3153,12 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
LIST_INSERT_HEAD(&new_stp->ls_open, new_open, ls_list);
|
||||
LIST_INSERT_HEAD(&clp->lc_open, new_stp, ls_list);
|
||||
*new_stpp = NULL;
|
||||
nfsstatsv1_p->srvopenowners++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopenowners++;
|
||||
nfsrv_openpluslock++;
|
||||
}
|
||||
openstp = new_open;
|
||||
new_open = NULL;
|
||||
nfsstatsv1_p->srvopens++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopens++;
|
||||
nfsrv_openpluslock++;
|
||||
} else {
|
||||
error = NFSERR_RECLAIMCONFLICT;
|
||||
@ -3230,7 +3230,7 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
new_deleg->ls_stateid), new_deleg, ls_hash);
|
||||
LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list);
|
||||
new_deleg = NULL;
|
||||
nfsstatsv1_p->srvdelegates++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdelegates++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsrv_delegatecnt++;
|
||||
}
|
||||
@ -3252,7 +3252,7 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
new_open, ls_hash);
|
||||
openstp = new_open;
|
||||
new_open = NULL;
|
||||
nfsstatsv1_p->srvopens++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopens++;
|
||||
nfsrv_openpluslock++;
|
||||
|
||||
/*
|
||||
@ -3300,7 +3300,7 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
new_deleg->ls_stateid), new_deleg, ls_hash);
|
||||
LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg, ls_list);
|
||||
new_deleg = NULL;
|
||||
nfsstatsv1_p->srvdelegates++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdelegates++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsrv_delegatecnt++;
|
||||
}
|
||||
@ -3381,7 +3381,7 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
LIST_INSERT_HEAD(&clp->lc_deleg, new_deleg,
|
||||
ls_list);
|
||||
new_deleg = NULL;
|
||||
nfsstatsv1_p->srvdelegates++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvdelegates++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsrv_delegatecnt++;
|
||||
}
|
||||
@ -3409,9 +3409,9 @@ nfsrv_openctrl(struct nfsrv_descript *nd, vnode_t vp,
|
||||
openstp = new_open;
|
||||
new_open = NULL;
|
||||
*new_stpp = NULL;
|
||||
nfsstatsv1_p->srvopens++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopens++;
|
||||
nfsrv_openpluslock++;
|
||||
nfsstatsv1_p->srvopenowners++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvopenowners++;
|
||||
nfsrv_openpluslock++;
|
||||
}
|
||||
if (!error) {
|
||||
@ -3887,7 +3887,7 @@ nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop,
|
||||
else
|
||||
LIST_INSERT_AFTER(insert_lop, new_lop, lo_lckowner);
|
||||
if (stp != NULL) {
|
||||
nfsstatsv1_p->srvlocks++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlocks++;
|
||||
nfsrv_openpluslock++;
|
||||
}
|
||||
}
|
||||
@ -7455,7 +7455,7 @@ nfsrv_addlayout(struct nfsrv_descript *nd, struct nfslayout **lypp,
|
||||
/* Insert the new layout in the lists. */
|
||||
*lypp = NULL;
|
||||
atomic_add_int(&nfsrv_layoutcnt, 1);
|
||||
nfsstatsv1_p->srvlayouts++;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlayouts++;
|
||||
NFSBCOPY(lyp->lay_xdr, layp, lyp->lay_layoutlen);
|
||||
*layoutlenp = lyp->lay_layoutlen;
|
||||
TAILQ_INSERT_HEAD(&lhyp->list, lyp, lay_list);
|
||||
@ -7548,7 +7548,7 @@ nfsrv_freelayout(struct nfslayouthead *lhp, struct nfslayout *lyp)
|
||||
|
||||
NFSD_DEBUG(4, "Freelayout=%p\n", lyp);
|
||||
atomic_add_int(&nfsrv_layoutcnt, -1);
|
||||
nfsstatsv1_p->srvlayouts--;
|
||||
NFSD_VNET(nfsstatsv1_p)->srvlayouts--;
|
||||
TAILQ_REMOVE(lhp, lyp, lay_list);
|
||||
free(lyp, M_NFSDSTATE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user