mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
bozo: cap retry delay
Cap the retry delay to a reasonable amount of time instead of just doubling the delay until it reaches 16 hours. Change-Id: Ibc7dd75670a9b02f34050842b6e54df4f5a7c315 Reviewed-on: http://gerrit.openafs.org/10148 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
1c2dcda92b
commit
21c8f4809e
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#define BNODE_LWP_STACKSIZE (16 * 1024)
|
#define BNODE_LWP_STACKSIZE (16 * 1024)
|
||||||
#define BNODE_ERROR_COUNT_MAX 16 /* maximum number of retries */
|
#define BNODE_ERROR_COUNT_MAX 16 /* maximum number of retries */
|
||||||
|
#define BNODE_ERROR_DELAY_MAX 60 /* maximum retry delay (seconds) */
|
||||||
|
|
||||||
int bnode_waiting = 0;
|
int bnode_waiting = 0;
|
||||||
static PROCESS bproc_pid; /* pid of waker-upper */
|
static PROCESS bproc_pid; /* pid of waker-upper */
|
||||||
@ -657,9 +658,12 @@ bproc(void *unused)
|
|||||||
} else {
|
} else {
|
||||||
tb->errorStopCount++;
|
tb->errorStopCount++;
|
||||||
if (!tb->errorStopDelay) {
|
if (!tb->errorStopDelay) {
|
||||||
tb->errorStopDelay = 1;
|
tb->errorStopDelay = 1; /* wait a second, then retry */
|
||||||
} else {
|
} else {
|
||||||
tb->errorStopDelay *= 2;
|
tb->errorStopDelay *= 2; /* ramp up the retry delays */
|
||||||
|
}
|
||||||
|
if (tb->errorStopDelay > BNODE_ERROR_DELAY_MAX) {
|
||||||
|
tb->errorStopDelay = BNODE_ERROR_DELAY_MAX; /* cap the delay */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tb->flags |= BNODE_ERRORSTOP;
|
tb->flags |= BNODE_ERRORSTOP;
|
||||||
|
Loading…
Reference in New Issue
Block a user