mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
- More properly handle interrupted NFS requests on an interruptible mount
by returning an error of EINTR rather than EACCES. - While here, bring back some (but not all) of the NFS RPC statistics lost when krpc was committed. Reviewed by: rmacklem MFC after: 1 week
This commit is contained in:
parent
58fdb5f3e6
commit
6910d7a0d8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245476
|
@ -767,12 +767,18 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
|||
if (stat == RPC_SUCCESS) {
|
||||
error = 0;
|
||||
} else if (stat == RPC_TIMEDOUT) {
|
||||
NFSINCRGLOBAL(newnfsstats.rpctimeouts);
|
||||
error = ETIMEDOUT;
|
||||
} else if (stat == RPC_VERSMISMATCH) {
|
||||
NFSINCRGLOBAL(newnfsstats.rpcinvalid);
|
||||
error = EOPNOTSUPP;
|
||||
} else if (stat == RPC_PROGVERSMISMATCH) {
|
||||
NFSINCRGLOBAL(newnfsstats.rpcinvalid);
|
||||
error = EPROTONOSUPPORT;
|
||||
} else if (stat == RPC_INTR) {
|
||||
error = EINTR;
|
||||
} else {
|
||||
NFSINCRGLOBAL(newnfsstats.rpcinvalid);
|
||||
error = EACCES;
|
||||
}
|
||||
if (error) {
|
||||
|
|
|
@ -549,14 +549,21 @@ nfs_request(struct vnode *vp, struct mbuf *mreq, int procnum,
|
|||
*/
|
||||
if (stat == RPC_SUCCESS)
|
||||
error = 0;
|
||||
else if (stat == RPC_TIMEDOUT)
|
||||
else if (stat == RPC_TIMEDOUT) {
|
||||
nfsstats.rpctimeouts++;
|
||||
error = ETIMEDOUT;
|
||||
else if (stat == RPC_VERSMISMATCH)
|
||||
} else if (stat == RPC_VERSMISMATCH) {
|
||||
nfsstats.rpcinvalid++;
|
||||
error = EOPNOTSUPP;
|
||||
else if (stat == RPC_PROGVERSMISMATCH)
|
||||
} else if (stat == RPC_PROGVERSMISMATCH) {
|
||||
nfsstats.rpcinvalid++;
|
||||
error = EPROTONOSUPPORT;
|
||||
else
|
||||
} else if (stat == RPC_INTR) {
|
||||
error = EINTR;
|
||||
} else {
|
||||
nfsstats.rpcinvalid++;
|
||||
error = EACCES;
|
||||
}
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
|
||||
|
@ -572,6 +579,7 @@ nfs_request(struct vnode *vp, struct mbuf *mreq, int procnum,
|
|||
if (error == ENOMEM) {
|
||||
m_freem(mrep);
|
||||
AUTH_DESTROY(auth);
|
||||
nfsstats.rpcinvalid++;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue