Add a volbusyCount field to cm_req_t. Increment the count each time
CM_ERROR_ALLBUSY is processed by cm_Analyze for a given request.
Wait 15 seconds between retries and retry up to 20 times and then
fail. This prevents requests from blocking for a volume that isn't
going to come back online for hours.
Change-Id: I25e68565700dddceebecedf552d1e04cbe39b22a
Reviewed-on: http://gerrit.openafs.org/9876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
volServerspp = NULL;
}
- if (timeLeft > 7) {
- thrd_Sleep(5000);
- statep = cm_VolumeStateByID(volp, fidp->volume);
+ /*
+ * retry all replicas for 5 minutes waiting 15 seconds
+ * between attempts.
+ */
+ if (timeLeft > 20 && reqp->volbusyCount++ < 20) {
+ thrd_Sleep(15000);
retry = 1;
}
cm_UpdateVolumeStatus(volp, fidp->volume);
int tokenError;
int idleError;
int vnovolError;
+ int volbusyCount;
afs_uint32 flags;
clientchar_t * tidPathp;
clientchar_t * relPathp;