diff options
author | Ed L. Cashin <ecashin@coraid.com> | 2006-09-20 14:36:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-18 15:53:50 -0400 |
commit | b751e8b6590efdb76e1682c85bfcd5f3531ccae4 (patch) | |
tree | b61a3a6a81d14491eca349ada8e3c49db95d3c28 | |
parent | 4f51dc5e9ae195d2e8c22e5f574e004c2f6518a4 (diff) |
aoe: module parameter for device timeout
The aoe_deadsecs module parameter sets the number of seconds that
elapse before a nonresponsive AoE device is marked as dead.
This is runtime settable in sysfs or settable with a module load or
kernel boot parameter.
Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 9ebc98ade3c5..f2b8f558e1bb 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -15,7 +15,10 @@ | |||
15 | #define TIMERTICK (HZ / 10) | 15 | #define TIMERTICK (HZ / 10) |
16 | #define MINTIMER (2 * TIMERTICK) | 16 | #define MINTIMER (2 * TIMERTICK) |
17 | #define MAXTIMER (HZ << 1) | 17 | #define MAXTIMER (HZ << 1) |
18 | #define MAXWAIT (60 * 3) /* After MAXWAIT seconds, give up and fail dev */ | 18 | |
19 | static int aoe_deadsecs = 60 * 3; | ||
20 | module_param(aoe_deadsecs, int, 0644); | ||
21 | MODULE_PARM_DESC(aoe_deadsecs, "After aoe_deadsecs seconds, give up and fail dev."); | ||
19 | 22 | ||
20 | struct sk_buff * | 23 | struct sk_buff * |
21 | new_skb(ulong len) | 24 | new_skb(ulong len) |
@@ -373,7 +376,7 @@ rexmit_timer(ulong vp) | |||
373 | if (f->tag != FREETAG && tsince(f->tag) >= timeout) { | 376 | if (f->tag != FREETAG && tsince(f->tag) >= timeout) { |
374 | n = f->waited += timeout; | 377 | n = f->waited += timeout; |
375 | n /= HZ; | 378 | n /= HZ; |
376 | if (n > MAXWAIT) { /* waited too long. device failure. */ | 379 | if (n > aoe_deadsecs) { /* waited too long for response */ |
377 | aoedev_downdev(d); | 380 | aoedev_downdev(d); |
378 | break; | 381 | break; |
379 | } | 382 | } |