summaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoenet.c
diff options
context:
space:
mode:
authorEd L. Cashin <ecashin@coraid.com>2008-02-08 04:20:00 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:31 -0800
commit68e0d42f39d85b334d3867a4e5fc2e0e775c1a6c (patch)
treef4cdb47157de4dace5b99e69fc39ea017495922e /drivers/block/aoe/aoenet.c
parent8911ef4dc97f77797f297318010a7424300d2d50 (diff)
downloadblackbird-op-linux-68e0d42f39d85b334d3867a4e5fc2e0e775c1a6c.tar.gz
blackbird-op-linux-68e0d42f39d85b334d3867a4e5fc2e0e775c1a6c.zip
aoe: handle multiple network paths to AoE device
A remote AoE device is something can process ATA commands and is identified by an AoE shelf number and an AoE slot number. Such a device might have more than one network interface, and it might be reachable by more than one local network interface. This patch tracks the available network paths available to each AoE device, allowing them to be used more efficiently. Andrew Morton asked about the call to msleep_interruptible in the revalidate function. Yes, if a signal is pending, then msleep_interruptible will not return 0. That means we will not loop but will call aoenet_xmit with a NULL skb, which is a noop. If the system is too low on memory or the aoe driver is too low on frames, then the user can hit control-C to interrupt the attempt to do a revalidate. I have added a comment to the code summarizing that. Andrew Morton asked whether the allocation performed inside addtgt could use a more relaxed allocation like GFP_KERNEL, but addtgt is called when the aoedev lock has been locked with spin_lock_irqsave. It would be nice to allocate the memory under fewer restrictions, but targets are only added when the device is being discovered, and if the target can't be added right now, we can try again in a minute when then next AoE config query broadcast goes out. Andrew Morton pointed out that the "too many targets" message could be printed for failing GFP_ATOMIC allocations. The last patch in this series makes the messages more specific. Signed-off-by: Ed L. Cashin <ecashin@coraid.com> Cc: Greg KH <greg@kroah.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/aoenet.c')
-rw-r--r--drivers/block/aoe/aoenet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index 4e6deb7f5c24..7a38a45ce110 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -137,9 +137,12 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
if (n > NECODES)
n = 0;
if (net_ratelimit())
- printk(KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n",
- be16_to_cpu(get_unaligned(&h->major)), h->minor,
- h->err, aoe_errlist[n]);
+ printk(KERN_ERR
+ "%s%d.%d@%s; ecode=%d '%s'\n",
+ "aoe: error packet from ",
+ be16_to_cpu(get_unaligned(&h->major)),
+ h->minor, skb->dev->name,
+ h->err, aoe_errlist[n]);
goto exit;
}
OpenPOWER on IntegriCloud