From: Jeffrey Altman Date: Thu, 22 Mar 2012 19:55:47 +0000 (-0400) Subject: Windows: Client handling of VNOSERVICE X-Git-Tag: openafs-stable-1_8_0pre1~2691 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=39964d08792f3a09694f97d7c7fa76a86ca213a7 Windows: Client handling of VNOSERVICE 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 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index 6f2bdf8..30bc192 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -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