Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/nfs/nfs_commonkrpc.c
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | |||||
uint32_t nfscl_nfs4_start_probes[NFSV41_NPROCS + 1]; | uint32_t nfscl_nfs4_start_probes[NFSV41_NPROCS + 1]; | ||||
uint32_t nfscl_nfs4_done_probes[NFSV41_NPROCS + 1]; | uint32_t nfscl_nfs4_done_probes[NFSV41_NPROCS + 1]; | ||||
#endif | #endif | ||||
NFSSTATESPINLOCK; | NFSSTATESPINLOCK; | ||||
NFSREQSPINLOCK; | NFSREQSPINLOCK; | ||||
NFSDLOCKMUTEX; | NFSDLOCKMUTEX; | ||||
extern struct nfsstats newnfsstats; | extern struct nfsstatsv1 nfsstatsv1; | ||||
extern struct nfsreqhead nfsd_reqq; | extern struct nfsreqhead nfsd_reqq; | ||||
extern int nfscl_ticks; | extern int nfscl_ticks; | ||||
extern void (*ncl_call_invalcaches)(struct vnode *); | extern void (*ncl_call_invalcaches)(struct vnode *); | ||||
extern int nfs_numnfscbd; | extern int nfs_numnfscbd; | ||||
extern int nfscl_debuglevel; | extern int nfscl_debuglevel; | ||||
SVCPOOL *nfscbd_pool; | SVCPOOL *nfscbd_pool; | ||||
static int nfsrv_gsscallbackson = 0; | static int nfsrv_gsscallbackson = 0; | ||||
▲ Show 20 Lines • Show All 536 Lines • ▼ Show 20 Lines | newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, | ||||
procnum = nd->nd_procnum; | procnum = nd->nd_procnum; | ||||
if ((nd->nd_flag & ND_NFSV4) && | if ((nd->nd_flag & ND_NFSV4) && | ||||
nd->nd_procnum != NFSPROC_NULL && | nd->nd_procnum != NFSPROC_NULL && | ||||
nd->nd_procnum != NFSV4PROC_CBCOMPOUND) | nd->nd_procnum != NFSV4PROC_CBCOMPOUND) | ||||
procnum = NFSV4PROC_COMPOUND; | procnum = NFSV4PROC_COMPOUND; | ||||
if (nmp != NULL) { | if (nmp != NULL) { | ||||
NFSINCRGLOBAL(newnfsstats.rpcrequests); | NFSINCRGLOBAL(nfsstatsv1.rpcrequests); | ||||
/* Map the procnum to the old NFSv2 one, as required. */ | /* Map the procnum to the old NFSv2 one, as required. */ | ||||
if ((nd->nd_flag & ND_NFSV2) != 0) { | if ((nd->nd_flag & ND_NFSV2) != 0) { | ||||
if (nd->nd_procnum < NFS_V3NPROCS) | if (nd->nd_procnum < NFS_V3NPROCS) | ||||
procnum = nfsv2_procid[nd->nd_procnum]; | procnum = nfsv2_procid[nd->nd_procnum]; | ||||
else | else | ||||
procnum = NFSV2PROC_NOOP; | procnum = NFSV2PROC_NOOP; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | tryagain: | ||||
/* | /* | ||||
* If there was a successful reply and a tprintf msg. | * If there was a successful reply and a tprintf msg. | ||||
* tprintf a response. | * tprintf a response. | ||||
*/ | */ | ||||
if (stat == RPC_SUCCESS) { | if (stat == RPC_SUCCESS) { | ||||
error = 0; | error = 0; | ||||
} else if (stat == RPC_TIMEDOUT) { | } else if (stat == RPC_TIMEDOUT) { | ||||
NFSINCRGLOBAL(newnfsstats.rpctimeouts); | NFSINCRGLOBAL(nfsstatsv1.rpctimeouts); | ||||
error = ETIMEDOUT; | error = ETIMEDOUT; | ||||
} else if (stat == RPC_VERSMISMATCH) { | } else if (stat == RPC_VERSMISMATCH) { | ||||
NFSINCRGLOBAL(newnfsstats.rpcinvalid); | NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); | ||||
error = EOPNOTSUPP; | error = EOPNOTSUPP; | ||||
} else if (stat == RPC_PROGVERSMISMATCH) { | } else if (stat == RPC_PROGVERSMISMATCH) { | ||||
NFSINCRGLOBAL(newnfsstats.rpcinvalid); | NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); | ||||
error = EPROTONOSUPPORT; | error = EPROTONOSUPPORT; | ||||
} else if (stat == RPC_INTR) { | } else if (stat == RPC_INTR) { | ||||
error = EINTR; | error = EINTR; | ||||
} else { | } else { | ||||
NFSINCRGLOBAL(newnfsstats.rpcinvalid); | NFSINCRGLOBAL(nfsstatsv1.rpcinvalid); | ||||
error = EACCES; | error = EACCES; | ||||
} | } | ||||
if (error) { | if (error) { | ||||
m_freem(nd->nd_mreq); | m_freem(nd->nd_mreq); | ||||
if (usegssname == 0) | if (usegssname == 0) | ||||
AUTH_DESTROY(auth); | AUTH_DESTROY(auth); | ||||
if (rep != NULL) | if (rep != NULL) | ||||
FREE((caddr_t)rep, M_NFSDREQ); | FREE((caddr_t)rep, M_NFSDREQ); | ||||
▲ Show 20 Lines • Show All 446 Lines • Show Last 20 Lines |