From: Jeffrey Altman Date: Fri, 17 May 2013 16:06:00 +0000 (-0400) Subject: Windows: Protect against infinite VIO retries X-Git-Tag: openafs-stable-1_8_0pre1~1157 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=436836d81ad17d78ddfe794db0c3bbf8f31a2783 Windows: Protect against infinite VIO retries Keep track of the number of VIO errors reported by the file servers. If the count exceeds 100, abandon the request. Change-Id: I4d18ccca732802752c94c9ca1b36ca9a827c72de Reviewed-on: http://gerrit.openafs.org/9923 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index b007f40..eb8fd3b 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -832,6 +832,12 @@ cm_Analyze(cm_conn_t *connp, reqp->vnovolError++; } + /* Remember that the VIO error occurred */ + if (errorCode == VIO) { + reqp->errorServp = serverp; + reqp->vioCount++; + } + /* Free the server list before cm_ForceUpdateVolume is called */ if (free_svr_list) { cm_FreeServerList(volServerspp, 0); @@ -839,7 +845,7 @@ cm_Analyze(cm_conn_t *connp, free_svr_list = 0; } - if ( timeLeft > 2 ) + if ( timeLeft > 2 && reqp->vioCount < 100) retry = 1; } else if ( errorCode == VNOVNODE ) { if (connp) diff --git a/src/WINNT/afsd/cm_conn.h b/src/WINNT/afsd/cm_conn.h index f81371a..e8b1076 100644 --- a/src/WINNT/afsd/cm_conn.h +++ b/src/WINNT/afsd/cm_conn.h @@ -68,6 +68,7 @@ typedef struct cm_req { int idleError; int vnovolError; int volbusyCount; + int vioCount; afs_uint32 flags; clientchar_t * tidPathp; clientchar_t * relPathp;