]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
aoe: failover remote interface based on aoe_deadsecs parameter
authorEd Cashin <ecashin@coraid.com>
Fri, 28 Sep 2012 00:22:23 +0000 (10:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 3 Oct 2012 06:51:04 +0000 (16:51 +1000)
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>
drivers/block/aoe/aoe.h
drivers/block/aoe/aoecmd.c

index ffded64dcbeb8ab56e2c9a2762fca0f1a326c8c4..d17b727639735e684de78474c3a5d5b7b87f0237 100644 (file)
@@ -96,7 +96,6 @@ enum {
        TIMERTICK = HZ / 10,
        MINTIMER = HZ >> 2,
        MAXTIMER = HZ << 1,
-       HELPWAIT = 20,
 };
 
 struct buf {
index bbab40c8d67cb58c5f0ec87d76c186da02f564a8..e3291dfa76075c38ecde0789a4b4838676a2f77d 100644 (file)
@@ -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--;