From 5342de7a58c4516259fa48ee2d282bc6046830cb Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 8 May 2013 14:08:59 -0400 Subject: [PATCH] Windows: cm_Analyze if no retry don't sleep If error handling response is not going to result in a retry of the call, do not sleep. Change-Id: I12435612f94a2e6afb77b5a2975f90f66e02823a Reviewed-on: http://gerrit.openafs.org/9881 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_conn.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index 686e7c749..b007f408c 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -519,7 +519,9 @@ cm_Analyze(cm_conn_t *connp, * Do not perform a cm_CheckOfflineVolume() if cm_Analyze() * was called by cm_CheckOfflineVolumeState(). */ - if (!(reqp->flags & CM_REQ_OFFLINE_VOL_CHK) && timeLeft > 7) { + if (!(reqp->flags & (CM_REQ_OFFLINE_VOL_CHK|CM_REQ_NORETRY)) && + timeLeft > 7) + { thrd_Sleep(5000); /* cm_CheckOfflineVolume() resets the serverRef state */ @@ -568,7 +570,9 @@ cm_Analyze(cm_conn_t *connp, * retry all replicas for 5 minutes waiting 15 seconds * between attempts. */ - if (timeLeft > 20 && reqp->volbusyCount++ < 20) { + if (timeLeft > 20 && !(reqp->flags & CM_REQ_NORETRY) && + reqp->volbusyCount++ < 20) + { thrd_Sleep(15000); retry = 1; } @@ -582,13 +586,12 @@ cm_Analyze(cm_conn_t *connp, } else { /* VL Server query */ osi_Log0(afsd_logp, "cm_Analyze passed CM_ERROR_ALLBUSY (VL Server)."); - if (timeLeft > 7) { + if (timeLeft > 7 && !(reqp->flags & CM_REQ_NORETRY) && vlServerspp) + { thrd_Sleep(5000); - if (vlServerspp) { - cm_ResetServerBusyStatus(vlServerspp); - retry = 1; - } + cm_ResetServerBusyStatus(vlServerspp); + retry = 1; } } } -- 2.39.5