]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: Client handling of VNOSERVICE
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 22 Mar 2012 19:55:47 +0000 (15:55 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 22 Mar 2012 20:44:27 +0000 (13:44 -0700)
VNOSERVICE should not be grouped together with the volume status
error codes.  It is used to indicate that the RPC was not serviced.
The file server issues it when its idle dead timeout period is reached
while receiving rx call data.  The client's existing status information
is still valid and the client can retry the call.

Change-Id: I51e447824366381e740361576c96559f1c4f3fd3
Reviewed-on: http://gerrit.openafs.org/6938
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsd/cm_conn.c

index 6f2bdf8ce359ef83b417de410a215dcfe4f1332a..30bc192c504512264823967081e2d2fa7d6dfb91 100644 (file)
@@ -588,7 +588,7 @@ cm_Analyze(cm_conn_t *connp,
 
     /* special codes:  missing volumes */
     else if (errorCode == VNOVOL || errorCode == VMOVED || errorCode == VOFFLINE ||
-             errorCode == VSALVAGE || errorCode == VNOSERVICE || errorCode == VIO)
+             errorCode == VSALVAGE || errorCode == VIO)
     {
         /* In case of timeout */
         reqp->volumeError = errorCode;
@@ -610,10 +610,6 @@ cm_Analyze(cm_conn_t *connp,
            msgID = MSG_SERVER_REPORTS_VSALVAGE;
             format = "Server %s reported volume %d in cell %s as needs salvage.";
             break;
-        case VNOSERVICE:
-           msgID = MSG_SERVER_REPORTS_VNOSERVICE;
-            format = "Server %s reported volume %d in cell %s as not in service.";
-            break;
         case VIO:
            msgID = MSG_SERVER_REPORTS_VIO;
             format = "Server %s reported volume %d in cell %s as temporarily unaccessible.";
@@ -857,6 +853,33 @@ cm_Analyze(cm_conn_t *connp,
                  osi_LogSaveString(afsd_logp,addr));
         retry = 1;
     }
+    else if (errorCode == VNOSERVICE) {
+        /*
+         * The server did not service the RPC.
+         * If this was a file server RPC it means that for at
+         * least the file server's idle dead timeout period the
+         * file server did not receive any new data packets from
+         * client.
+         *
+         * The RPC was not serviced so it can be retried and any
+         * existing status information is still valid.
+         */
+        if (fidp) {
+            if (serverp)
+                sprintf(addr, "%d.%d.%d.%d",
+                        ((serverp->addr.sin_addr.s_addr & 0xff)),
+                        ((serverp->addr.sin_addr.s_addr & 0xff00)>> 8),
+                        ((serverp->addr.sin_addr.s_addr & 0xff0000)>> 16),
+                        ((serverp->addr.sin_addr.s_addr & 0xff000000)>> 24));
+
+            LogEvent(EVENTLOG_WARNING_TYPE, MSG_SERVER_REPORTS_VNOSERVICE, addr);
+            osi_Log1(afsd_logp, "Server %s reported volume %d in cell %s as not in service.",
+                     osi_LogSaveString(afsd_logp,addr), fidp->volume, cellp->name);
+        }
+
+        if (timeLeft > 2)
+            retry = 1;
+    }
     else if (errorCode == RX_CALL_IDLE) {
         /*
          * RPC failed because the server failed to respond with data