Skip to content

Commit

Permalink
aoe: module parameter for device timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ed L. Cashin authored and Greg Kroah-Hartman committed Oct 18, 2006
1 parent 4f51dc5 commit b751e8b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
#define TIMERTICK (HZ / 10)
#define MINTIMER (2 * TIMERTICK)
#define MAXTIMER (HZ << 1)
#define MAXWAIT (60 * 3) /* After MAXWAIT seconds, give up and fail dev */

static int aoe_deadsecs = 60 * 3;
module_param(aoe_deadsecs, int, 0644);
MODULE_PARM_DESC(aoe_deadsecs, "After aoe_deadsecs seconds, give up and fail dev.");

struct sk_buff *
new_skb(ulong len)
Expand Down Expand Up @@ -373,7 +376,7 @@ rexmit_timer(ulong vp)
if (f->tag != FREETAG && tsince(f->tag) >= timeout) {
n = f->waited += timeout;
n /= HZ;
if (n > MAXWAIT) { /* waited too long. device failure. */
if (n > aoe_deadsecs) { /* waited too long for response */
aoedev_downdev(d);
break;
}
Expand Down

0 comments on commit b751e8b

Please sign in to comment.