[Midnightbsd-cvs] src [8860] trunk/sys: more properly handle interrupted NFS requests on an interruptible mount by rewturning an error of EINTER rather than EACCESS.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 26 09:04:34 EDT 2016
Revision: 8860
http://svnweb.midnightbsd.org/src/?rev=8860
Author: laffer1
Date: 2016-09-26 09:04:34 -0400 (Mon, 26 Sep 2016)
Log Message:
-----------
more properly handle interrupted NFS requests on an interruptible mount by rewturning an error of EINTER rather than EACCESS.
Modified Paths:
--------------
trunk/sys/fs/nfs/nfs_commonkrpc.c
trunk/sys/nfsclient/nfs_krpc.c
Modified: trunk/sys/fs/nfs/nfs_commonkrpc.c
===================================================================
--- trunk/sys/fs/nfs/nfs_commonkrpc.c 2016-09-26 13:03:52 UTC (rev 8859)
+++ trunk/sys/fs/nfs/nfs_commonkrpc.c 2016-09-26 13:04:34 UTC (rev 8860)
@@ -741,12 +741,18 @@
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) {
Modified: trunk/sys/nfsclient/nfs_krpc.c
===================================================================
--- trunk/sys/nfsclient/nfs_krpc.c 2016-09-26 13:03:52 UTC (rev 8859)
+++ trunk/sys/nfsclient/nfs_krpc.c 2016-09-26 13:04:34 UTC (rev 8860)
@@ -549,14 +549,21 @@
*/
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 @@
if (error == ENOMEM) {
m_freem(mrep);
AUTH_DESTROY(auth);
+ nfsstats.rpcinvalid++;
return (error);
}
More information about the Midnightbsd-cvs
mailing list