mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Windows: better handle RX_MSGSIZE errors
An RX_MSGSIZE error is returned by the new PMTU detection code. It is critical that such an error result in a retry of the operation that failed. Otherwise, the PMTU detection can't work and the server will be marked down. Secondly, it is important that such errors not leak to the application layer. Map them to CM_ERROR_RETRY in all cases. LICENSE MIT Change-Id: I966fe259080bd31ec60fdb6715f54e18e190c790 Reviewed-on: http://gerrit.openafs.org/2656 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
874c5ca835
commit
b11ff643b5
@ -740,7 +740,6 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
|
|||||||
osi_LogSaveString(afsd_logp,addr));
|
osi_LogSaveString(afsd_logp,addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeLeft > 2)
|
|
||||||
retry = 1;
|
retry = 1;
|
||||||
}
|
}
|
||||||
else if (errorCode >= -64 && errorCode < 0) {
|
else if (errorCode >= -64 && errorCode < 0) {
|
||||||
@ -967,7 +966,7 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If not allowed to retry, don't */
|
/* If not allowed to retry, don't */
|
||||||
if (!forcing_new && (reqp->flags & CM_REQ_NORETRY))
|
if (!forcing_new && (reqp->flags & CM_REQ_NORETRY) && (errorCode != RX_MSGSIZE))
|
||||||
retry = 0;
|
retry = 0;
|
||||||
else if (retry && dead_session)
|
else if (retry && dead_session)
|
||||||
retry = 0;
|
retry = 0;
|
||||||
|
@ -209,10 +209,13 @@ long cm_MapRPCError(long error, cm_req_t *reqp)
|
|||||||
error = et_to_sys_error(error);
|
error = et_to_sys_error(error);
|
||||||
|
|
||||||
if (error == RX_CALL_DEAD ||
|
if (error == RX_CALL_DEAD ||
|
||||||
error == RX_CALL_TIMEOUT)
|
error == RX_CALL_TIMEOUT ||
|
||||||
|
error == RX_MSGSIZE)
|
||||||
error = CM_ERROR_RETRY;
|
error = CM_ERROR_RETRY;
|
||||||
else if (error < 0)
|
else if (error < 0)
|
||||||
error = CM_ERROR_UNKNOWN;
|
error = CM_ERROR_UNKNOWN;
|
||||||
|
else if (error == EINVAL)
|
||||||
|
error = CM_ERROR_INVAL;
|
||||||
else if (error == EROFS)
|
else if (error == EROFS)
|
||||||
error = CM_ERROR_READONLY;
|
error = CM_ERROR_READONLY;
|
||||||
else if (error == EACCES)
|
else if (error == EACCES)
|
||||||
@ -270,7 +273,8 @@ long cm_MapRPCErrorRmdir(long error, cm_req_t *reqp)
|
|||||||
error = et_to_sys_error(error);
|
error = et_to_sys_error(error);
|
||||||
|
|
||||||
if (error == RX_CALL_DEAD ||
|
if (error == RX_CALL_DEAD ||
|
||||||
error == RX_CALL_TIMEOUT)
|
error == RX_CALL_TIMEOUT ||
|
||||||
|
error == RX_MSGSIZE)
|
||||||
error = CM_ERROR_RETRY;
|
error = CM_ERROR_RETRY;
|
||||||
else if (error == VNOVNODE)
|
else if (error == VNOVNODE)
|
||||||
error = CM_ERROR_BADFD;
|
error = CM_ERROR_BADFD;
|
||||||
@ -288,6 +292,8 @@ long cm_MapRPCErrorRmdir(long error, cm_req_t *reqp)
|
|||||||
error = CM_ERROR_NOACCESS;
|
error = CM_ERROR_NOACCESS;
|
||||||
else if (error == ENOENT)
|
else if (error == ENOENT)
|
||||||
error = CM_ERROR_NOSUCHFILE;
|
error = CM_ERROR_NOSUCHFILE;
|
||||||
|
else if (error == EINVAL)
|
||||||
|
error = CM_ERROR_INVAL;
|
||||||
else if (error == ENOTEMPTY
|
else if (error == ENOTEMPTY
|
||||||
|| error == 17 /* AIX */
|
|| error == 17 /* AIX */
|
||||||
|| error == 66 /* SunOS 4, Digital UNIX */
|
|| error == 66 /* SunOS 4, Digital UNIX */
|
||||||
@ -315,12 +321,15 @@ long cm_MapVLRPCError(long error, cm_req_t *reqp)
|
|||||||
error = et_to_sys_error(error);
|
error = et_to_sys_error(error);
|
||||||
|
|
||||||
if (error == RX_CALL_DEAD ||
|
if (error == RX_CALL_DEAD ||
|
||||||
error == RX_CALL_TIMEOUT)
|
error == RX_CALL_TIMEOUT ||
|
||||||
|
error == RX_MSGSIZE)
|
||||||
error = CM_ERROR_RETRY;
|
error = CM_ERROR_RETRY;
|
||||||
else if (error == RX_RESTARTING)
|
else if (error == RX_RESTARTING)
|
||||||
error = CM_ERROR_ALLBUSY;
|
error = CM_ERROR_ALLBUSY;
|
||||||
else if (error < 0)
|
else if (error < 0)
|
||||||
error = CM_ERROR_UNKNOWN;
|
error = CM_ERROR_UNKNOWN;
|
||||||
|
else if (error == EINVAL)
|
||||||
|
error = CM_ERROR_INVAL;
|
||||||
else if (error == VL_NOENT || error == VL_BADNAME)
|
else if (error == VL_NOENT || error == VL_BADNAME)
|
||||||
error = CM_ERROR_NOSUCHVOLUME;
|
error = CM_ERROR_NOSUCHVOLUME;
|
||||||
return error;
|
return error;
|
||||||
|
Loading…
Reference in New Issue
Block a user