Skip to content

Commit

Permalink
aoe: failover remote interface based on aoe_deadsecs parameter
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ecashin authored and torvalds committed Oct 5, 2012
1 parent 3f0f013 commit d54d35a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion drivers/block/aoe/aoe.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ enum {
TIMERTICK = HZ / 10,
MINTIMER = HZ >> 2,
MAXTIMER = HZ << 1,
HELPWAIT = 20,
};

struct buf {
Expand Down
8 changes: 3 additions & 5 deletions drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit d54d35a

Please sign in to comment.