From a1b5a1d42280753de13094006dcc130fede978a1 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 17 Nov 2013 23:03:43 -0500 Subject: [PATCH] Windows: cm_Analyze retries vs CM_REQ_NORETRY CM_REQ_NORETRY is set by threads that want all errors returned immediately. However, there are some errors that should never be returned: RX_MSGSIZE RX_CALL_BUSY VNOSERVICE RX_CALL_IDLE RXKADEXPIRED VICECONNBAD VICETOKENDEAD For these errors even if the thread has requested no retries a RPC retry must be performed. Change-Id: I692f65a9fdbbf27fc880ac8912fc72c1d1357c6d Reviewed-on: http://gerrit.openafs.org/10470 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/WINNT/afsd/cm_conn.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index 06bb81166..642b76668 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -969,7 +969,7 @@ cm_Analyze(cm_conn_t *connp, osi_Log1(afsd_logp, "cm_Analyze: Path MTU may have been exceeded addr[%s]", osi_LogSaveString(afsd_logp,addr)); - retry = 1; + retry = 2; } else if (errorCode == RX_CALL_BUSY) { /* @@ -990,7 +990,7 @@ cm_Analyze(cm_conn_t *connp, LogEvent(EVENTLOG_WARNING_TYPE, MSG_RX_BUSY_CALL_CHANNEL, addr); osi_Log1(afsd_logp, "cm_Analyze: Retry RPC due to busy call channel addr[%s]", osi_LogSaveString(afsd_logp,addr)); - retry = 1; + retry = 2; } else if (errorCode == VNOSERVICE) { /* @@ -1020,8 +1020,7 @@ cm_Analyze(cm_conn_t *connp, osi_LogSaveString(afsd_logp,addr), fidp->volume, cellp->name); } - if (timeLeft > 2) - retry = 1; + retry = 2; } else if (errorCode == RX_CALL_IDLE) { /* @@ -1095,8 +1094,7 @@ cm_Analyze(cm_conn_t *connp, reqp->errorServp = serverp; reqp->tokenError = errorCode; - if (timeLeft > 2) - retry = 1; + retry = 2; } LogEvent(EVENTLOG_WARNING_TYPE, MSG_RX_IDLE_DEAD_TIMEOUT, addr, retry); @@ -1200,8 +1198,8 @@ cm_Analyze(cm_conn_t *connp, forcing_new = 1; cm_ForceNewConnections(serverp); - if ( timeLeft > 2 ) - retry = 1; + if ( timeLeft > 2 ) + retry = 2; } } else if (errorCode >= ERROR_TABLE_BASE_RXK && errorCode < ERROR_TABLE_BASE_RXK + 256) { char * s = "unknown error"; @@ -1251,8 +1249,7 @@ cm_Analyze(cm_conn_t *connp, reqp->flags |= CM_REQ_NEW_CONN_FORCED; forcing_new = 1; cm_ForceNewConnections(serverp); - if ( timeLeft > 2 ) - retry = 1; + retry = 2; } else { if (connp) _InterlockedAnd(&connp->flags, ~CM_CONN_FLAG_NEW); -- 2.39.5