2012-10-05 02:16:38 +02:00
|
|
|
/* Copyright (c) 2012 Coraid, Inc. See COPYING for GPL terms. */
|
2012-12-18 01:03:41 +01:00
|
|
|
#define VERSION "60"
|
2005-04-17 00:20:36 +02:00
|
|
|
#define AOE_MAJOR 152
|
|
|
|
#define DEVICE_NAME "aoe"
|
2005-04-19 07:00:17 +02:00
|
|
|
|
|
|
|
/* set AOE_PARTITIONS to 1 to use whole-disks only
|
|
|
|
* default is 16, which is 15 partitions plus the whole disk
|
|
|
|
*/
|
2005-04-17 00:20:36 +02:00
|
|
|
#ifndef AOE_PARTITIONS
|
2005-08-19 22:54:43 +02:00
|
|
|
#define AOE_PARTITIONS (16)
|
2005-04-17 00:20:36 +02:00
|
|
|
#endif
|
2005-04-19 07:00:17 +02:00
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
#define WHITESPACE " \t\v\f\n"
|
|
|
|
|
|
|
|
enum {
|
|
|
|
AOECMD_ATA,
|
|
|
|
AOECMD_CFG,
|
2009-02-18 23:48:13 +01:00
|
|
|
AOECMD_VEND_MIN = 0xf0,
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
AOEFL_RSP = (1<<3),
|
|
|
|
AOEFL_ERR = (1<<2),
|
|
|
|
|
|
|
|
AOEAFL_EXT = (1<<6),
|
|
|
|
AOEAFL_DEV = (1<<4),
|
|
|
|
AOEAFL_ASYNC = (1<<1),
|
|
|
|
AOEAFL_WRITE = (1<<0),
|
|
|
|
|
|
|
|
AOECCMD_READ = 0,
|
|
|
|
AOECCMD_TEST,
|
|
|
|
AOECCMD_PTEST,
|
|
|
|
AOECCMD_SET,
|
|
|
|
AOECCMD_FSET,
|
|
|
|
|
|
|
|
AOE_HVER = 0x10,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct aoe_hdr {
|
|
|
|
unsigned char dst[6];
|
|
|
|
unsigned char src[6];
|
2005-04-19 07:00:20 +02:00
|
|
|
__be16 type;
|
2005-04-17 00:20:36 +02:00
|
|
|
unsigned char verfl;
|
|
|
|
unsigned char err;
|
2005-04-19 07:00:20 +02:00
|
|
|
__be16 major;
|
2005-04-17 00:20:36 +02:00
|
|
|
unsigned char minor;
|
|
|
|
unsigned char cmd;
|
2005-04-19 07:00:20 +02:00
|
|
|
__be32 tag;
|
2005-04-17 00:20:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct aoe_atahdr {
|
|
|
|
unsigned char aflags;
|
|
|
|
unsigned char errfeat;
|
|
|
|
unsigned char scnt;
|
|
|
|
unsigned char cmdstat;
|
|
|
|
unsigned char lba0;
|
|
|
|
unsigned char lba1;
|
|
|
|
unsigned char lba2;
|
|
|
|
unsigned char lba3;
|
|
|
|
unsigned char lba4;
|
|
|
|
unsigned char lba5;
|
|
|
|
unsigned char res[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct aoe_cfghdr {
|
2005-04-19 07:00:20 +02:00
|
|
|
__be16 bufcnt;
|
|
|
|
__be16 fwver;
|
2006-09-20 20:36:49 +02:00
|
|
|
unsigned char scnt;
|
2005-04-17 00:20:36 +02:00
|
|
|
unsigned char aoeccmd;
|
|
|
|
unsigned char cslen[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
DEVFL_UP = 1, /* device is installed in system and ready for AoE->ATA commands */
|
|
|
|
DEVFL_TKILL = (1<<1), /* flag for timer to know when to kill self */
|
|
|
|
DEVFL_EXT = (1<<2), /* device accepts lba48 commands */
|
2012-10-05 02:16:35 +02:00
|
|
|
DEVFL_GDALLOC = (1<<3), /* need to alloc gendisk */
|
|
|
|
DEVFL_KICKME = (1<<4), /* slow polling network card catch */
|
|
|
|
DEVFL_NEWSIZE = (1<<5), /* need to update dev size in block layer */
|
2005-04-17 00:20:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2006-09-20 20:36:49 +02:00
|
|
|
DEFAULTBCNT = 2 * 512, /* 2 sectors */
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
MIN_BUFS = 16,
|
|
|
|
NTARGETS = 8,
|
|
|
|
NAOEIFS = 8,
|
2012-10-05 02:16:23 +02:00
|
|
|
NSKBPOOLMAX = 256,
|
2012-10-05 02:16:33 +02:00
|
|
|
NFACTIVE = 61,
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
|
|
|
|
TIMERTICK = HZ / 10,
|
2012-12-18 01:03:43 +01:00
|
|
|
RTTSCALE = 8,
|
|
|
|
RTTDSCALE = 3,
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
MAXTIMER = HZ << 1,
|
2012-12-18 01:03:43 +01:00
|
|
|
RTTAVG_INIT = HZ / 4 << RTTSCALE,
|
|
|
|
RTTDEV_INIT = RTTAVG_INIT / 4,
|
2005-04-17 00:20:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct buf {
|
|
|
|
ulong nframesout;
|
|
|
|
ulong resid;
|
|
|
|
ulong bv_resid;
|
|
|
|
sector_t sector;
|
|
|
|
struct bio *bio;
|
|
|
|
struct bio_vec *bv;
|
2012-10-05 02:16:23 +02:00
|
|
|
struct request *rq;
|
2005-04-17 00:20:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct frame {
|
2012-10-05 02:16:21 +02:00
|
|
|
struct list_head head;
|
|
|
|
u32 tag;
|
2005-04-17 00:20:36 +02:00
|
|
|
ulong waited;
|
2012-10-05 02:16:21 +02:00
|
|
|
struct aoetgt *t; /* parent target I belong to */
|
2006-09-20 20:36:49 +02:00
|
|
|
sector_t lba;
|
2012-10-05 02:16:21 +02:00
|
|
|
struct sk_buff *skb; /* command skb freed on module exit */
|
|
|
|
struct sk_buff *r_skb; /* response skb for async processing */
|
2012-10-05 02:16:23 +02:00
|
|
|
struct buf *buf;
|
2012-10-05 02:16:20 +02:00
|
|
|
struct bio_vec *bv;
|
2012-10-05 02:16:23 +02:00
|
|
|
ulong bcnt;
|
2012-10-05 02:16:20 +02:00
|
|
|
ulong bv_off;
|
2005-04-17 00:20:36 +02:00
|
|
|
};
|
|
|
|
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
struct aoeif {
|
|
|
|
struct net_device *nd;
|
2012-10-05 02:16:27 +02:00
|
|
|
ulong lost;
|
|
|
|
int bcnt;
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct aoetgt {
|
|
|
|
unsigned char addr[6];
|
2012-12-18 01:03:29 +01:00
|
|
|
ushort nframes; /* cap on frames to use */
|
2012-10-05 02:16:21 +02:00
|
|
|
struct aoedev *d; /* parent device I belong to */
|
|
|
|
struct list_head ffree; /* list of free frames */
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
struct aoeif ifs[NAOEIFS];
|
|
|
|
struct aoeif *ifp; /* current aoeif in use */
|
2012-12-18 01:03:43 +01:00
|
|
|
ushort nout; /* value of nout when skb was sent */
|
2012-12-18 01:03:29 +01:00
|
|
|
ushort maxout; /* current value for max outstanding */
|
2012-12-18 01:03:43 +01:00
|
|
|
ushort next_cwnd; /* incr maxout after decrementing to zero */
|
|
|
|
ushort ssthresh; /* slow start threshold */
|
2012-12-18 01:03:29 +01:00
|
|
|
ulong falloc; /* number of allocated frames */
|
2012-10-05 02:16:27 +02:00
|
|
|
int minbcnt;
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
int wpkts, rpkts;
|
|
|
|
};
|
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
struct aoedev {
|
|
|
|
struct aoedev *next;
|
|
|
|
ulong sysminor;
|
|
|
|
ulong aoemajor;
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
u16 aoeminor;
|
|
|
|
u16 flags;
|
2006-09-20 20:36:49 +02:00
|
|
|
u16 nopen; /* (bd_openers isn't available without sleeping) */
|
2012-12-18 01:03:43 +01:00
|
|
|
u16 rttavg; /* scaled AoE round trip time average */
|
|
|
|
u16 rttdev; /* scaled round trip time mean deviation */
|
2005-04-17 00:20:36 +02:00
|
|
|
u16 fw_ver; /* version of blade's firmware */
|
2012-10-05 02:16:33 +02:00
|
|
|
u16 lasttag; /* last tag sent */
|
|
|
|
u16 useme;
|
2012-10-05 02:16:23 +02:00
|
|
|
ulong ref;
|
2005-04-17 00:20:36 +02:00
|
|
|
struct work_struct work;/* disk create work struct */
|
|
|
|
struct gendisk *gd;
|
2009-09-09 14:10:18 +02:00
|
|
|
struct request_queue *blkq;
|
2012-12-18 01:03:39 +01:00
|
|
|
struct hd_geometry geo;
|
2005-04-17 00:20:36 +02:00
|
|
|
sector_t ssize;
|
|
|
|
struct timer_list timer;
|
|
|
|
spinlock_t lock;
|
2008-09-22 07:36:49 +02:00
|
|
|
struct sk_buff_head skbpool;
|
2005-04-17 00:20:36 +02:00
|
|
|
mempool_t *bufpool; /* for deadlock-free Buf allocation */
|
2012-10-05 02:16:23 +02:00
|
|
|
struct { /* pointers to work in progress */
|
|
|
|
struct buf *buf;
|
|
|
|
struct bio *nxbio;
|
|
|
|
struct request *rq;
|
|
|
|
} ip;
|
2012-10-05 02:16:27 +02:00
|
|
|
ulong maxbcnt;
|
2012-10-05 02:16:33 +02:00
|
|
|
struct list_head factive[NFACTIVE]; /* hash of active frames */
|
2012-12-18 01:03:43 +01:00
|
|
|
struct list_head rexmitq; /* deferred retransmissions */
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
struct aoetgt *targets[NTARGETS];
|
|
|
|
struct aoetgt **tgt; /* target in use when working */
|
2012-10-05 02:16:21 +02:00
|
|
|
struct aoetgt *htgt; /* target needing rexmit assistance */
|
|
|
|
ulong ntargets;
|
|
|
|
ulong kicked;
|
2012-12-18 01:03:42 +01:00
|
|
|
char ident[512];
|
2005-04-17 00:20:36 +02:00
|
|
|
};
|
|
|
|
|
2012-10-05 02:16:21 +02:00
|
|
|
/* kthread tracking */
|
|
|
|
struct ktstate {
|
|
|
|
struct completion rendez;
|
|
|
|
struct task_struct *task;
|
|
|
|
wait_queue_head_t *waitq;
|
|
|
|
int (*fn) (void);
|
|
|
|
char *name;
|
|
|
|
spinlock_t *lock;
|
|
|
|
};
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
int aoeblk_init(void);
|
|
|
|
void aoeblk_exit(void);
|
|
|
|
void aoeblk_gdalloc(void *);
|
|
|
|
void aoedisk_rm_sysfs(struct aoedev *d);
|
|
|
|
|
|
|
|
int aoechr_init(void);
|
|
|
|
void aoechr_exit(void);
|
|
|
|
void aoechr_error(char *);
|
|
|
|
|
|
|
|
void aoecmd_work(struct aoedev *d);
|
2006-01-19 19:46:19 +01:00
|
|
|
void aoecmd_cfg(ushort aoemajor, unsigned char aoeminor);
|
2012-10-05 02:16:21 +02:00
|
|
|
struct sk_buff *aoecmd_ata_rsp(struct sk_buff *);
|
2005-04-17 00:20:36 +02:00
|
|
|
void aoecmd_cfg_rsp(struct sk_buff *);
|
2006-11-22 15:57:56 +01:00
|
|
|
void aoecmd_sleepwork(struct work_struct *);
|
2012-12-18 01:03:43 +01:00
|
|
|
void aoecmd_wreset(struct aoetgt *t);
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
void aoecmd_cleanslate(struct aoedev *);
|
2012-10-05 02:16:21 +02:00
|
|
|
void aoecmd_exit(void);
|
|
|
|
int aoecmd_init(void);
|
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>
2008-02-08 13:20:00 +01:00
|
|
|
struct sk_buff *aoecmd_ata_id(struct aoedev *);
|
2012-10-05 02:16:21 +02:00
|
|
|
void aoe_freetframe(struct frame *);
|
2012-10-05 02:16:23 +02:00
|
|
|
void aoe_flush_iocq(void);
|
|
|
|
void aoe_end_request(struct aoedev *, struct request *, int);
|
2012-10-05 02:16:25 +02:00
|
|
|
int aoe_ktstart(struct ktstate *k);
|
|
|
|
void aoe_ktstop(struct ktstate *k);
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
int aoedev_init(void);
|
|
|
|
void aoedev_exit(void);
|
2012-10-05 02:16:40 +02:00
|
|
|
struct aoedev *aoedev_by_aoeaddr(ulong maj, int min, int do_alloc);
|
2005-04-17 00:20:36 +02:00
|
|
|
void aoedev_downdev(struct aoedev *d);
|
2008-02-08 13:20:03 +01:00
|
|
|
int aoedev_flush(const char __user *str, size_t size);
|
2012-10-05 02:16:23 +02:00
|
|
|
void aoe_failbuf(struct aoedev *, struct buf *);
|
|
|
|
void aoedev_put(struct aoedev *);
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
int aoenet_init(void);
|
|
|
|
void aoenet_exit(void);
|
2008-09-22 07:36:49 +02:00
|
|
|
void aoenet_xmit(struct sk_buff_head *);
|
2005-04-17 00:20:36 +02:00
|
|
|
int is_aoe_netif(struct net_device *ifp);
|
|
|
|
int set_aoe_iflist(const char __user *str, size_t size);
|