avoid potentially looping forever in e.g. afs_FetchStatus because
we exit afs_Analyze too early to increment busyCount, and despite having
areq->busyCount non-zero we have servers still not_busy which are already down
that we'll never talk to again. that combined with no conn means we never
touch most of afs_Analyze, exiting early with shouldRetry set.
incrementing busyCount whenever we exit with shouldRetry set should
ensure we can never end up looping forever.
for (i=0; i < MAXHOSTS; i++) {
if (tvp->status[i] != not_busy && tvp->status[i] != offline) {
- tvp->status[i] = not_busy;
+ tvp->status[i] = not_busy;
}
- if (tvp->status[i] == not_busy)
- shouldRetry = 1;
+ if (tvp->status[i] == not_busy)
+ shouldRetry = 1;
}
afs_PutVolume(tvp, READ_LOCK);
} else {
} else {
VSleep(afs_BusyWaitPeriod); /* poll periodically */
}
+ if (shouldRetry != 0)
+ areq->busyCount++;
+
return shouldRetry; /* should retry */
}