summaryrefslogtreecommitdiff
path: root/drivers/block/aoe/aoecmd.c
diff options
context:
space:
mode:
authorEd Cashin <ecashin@coraid.com>2012-10-04 17:16:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-06 03:05:26 +0900
commitd54d35ac6605161a593e3f4411de338ef81b5263 (patch)
tree369561cb1495afc77a918ab6e36d9b47512b4e8c /drivers/block/aoe/aoecmd.c
parent3f0f0133747368fe0fcf3908f788b53591bff4e0 (diff)
aoe: failover remote interface based on aoe_deadsecs parameter
The aoe_deadsecs module parameter allows the user to specify a hard limit on the number of seconds an AoE command can be retransmitted before the AoE block device is considered to have failed. Using aoe_deadsecs to determine the time we try using a different remote interface helps to ensure that the hard limit is not reached before we've tried to recover by sending to a different remote port. As a data storage target, the AoE target is unambiguously identified by its {major, minor} AoE address tuple, and an AoE target can have multiple MAC addresses. However, note that "target" in the driver code and comments means a {major, minor, MAC address} tuple, as in "somewhere to send packets". Signed-off-by: Ed Cashin <ecashin@coraid.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r--drivers/block/aoe/aoecmd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index bbab40c8d67c..e3291dfa7607 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -633,11 +633,9 @@ rexmit_timer(ulong vp)
list_del(pos);
t = f->t;
- if (n > HELPWAIT) {
- /* see if another target can help */
- if (d->ntargets > 1)
- d->htgt = t;
- }
+ if (n > aoe_deadsecs/2)
+ d->htgt = t; /* see if another target can help */
+
if (t->nout == t->maxout) {
if (t->maxout > 1)
t->maxout--;