Windows: cm_Analyze retries vs CM_REQ_NORETRY
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 18 Nov 2013 04:03:43 +0000 (23:03 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Nov 2013 23:31:46 +0000 (15:31 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/cm_conn.c

index 06bb811..642b766 100644 (file)
@@ -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);