提交 b751e8b6 编写于 作者: E Ed L. Cashin 提交者: Greg Kroah-Hartman

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: N"Ed L. Cashin" <ecashin@coraid.com>
Acked-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 4f51dc5e
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
#define TIMERTICK (HZ / 10) #define TIMERTICK (HZ / 10)
#define MINTIMER (2 * TIMERTICK) #define MINTIMER (2 * TIMERTICK)
#define MAXTIMER (HZ << 1) #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 * struct sk_buff *
new_skb(ulong len) new_skb(ulong len)
...@@ -373,7 +376,7 @@ rexmit_timer(ulong vp) ...@@ -373,7 +376,7 @@ rexmit_timer(ulong vp)
if (f->tag != FREETAG && tsince(f->tag) >= timeout) { if (f->tag != FREETAG && tsince(f->tag) >= timeout) {
n = f->waited += timeout; n = f->waited += timeout;
n /= HZ; n /= HZ;
if (n > MAXWAIT) { /* waited too long. device failure. */ if (n > aoe_deadsecs) { /* waited too long for response */
aoedev_downdev(d); aoedev_downdev(d);
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册