diff --git a/EtherDrive-2.6-HOWTO.sgml b/EtherDrive-2.6-HOWTO.sgml index 6ed3a8f..69e064a 100644 --- a/EtherDrive-2.6-HOWTO.sgml +++ b/EtherDrive-2.6-HOWTO.sgml @@ -1060,8 +1060,12 @@ non-filesystem I/O, the complexity associated with coalescing multiple I/O jobs in the aoe driver is probably not worth the potential driver instability it could introduce. -There is a straightforward way, however, to work around this issue by -using a trivial md device as a wrapper. (Almost everyone uses a +One way to work around this issue is to use the O_DIRECT flag to +the "open" system call. For recent versions of dd, you can use the +option, "oflag=direct" to tell dd to use this O_DIRECT flag. + +Another way to work around this issue is to +use a trivial md device as a wrapper. (Almost everyone uses a filesystem. This technique is only interesting to those who are not using a filesystem, so most people should ignore this idea.) In the example below, a single-disk RAID 0 is created for the AoE device @@ -1082,7 +1086,6 @@ makki:~# cat /sys/block/md1/size 209715072 - Q: How can I boot diskless systems from my Coraid EtherDrive devices?

diff --git a/Makefile b/Makefile index c85d5c2..e5f2e5d 100644 --- a/Makefile +++ b/Makefile @@ -127,11 +127,17 @@ install: install_nodev # experts can put the driver in a kernel source tree with # "make kerninst" -kerninst: default +kerninst: conf/done mak/src-id.ts test -d ${KDIR}/drivers/block/aoe cp -b ${DRIVER_D}/*.[ch] ${KDIR}/drivers/block/aoe echo "#define AOE_PARTITIONS (${AOE_PARTITIONS})" \ >> ${KDIR}/drivers/block/aoe/aoe.h + echo '#define DEVSUBDIR "${DEVSUBDIR}"' \ + >> ${KDIR}/drivers/block/aoe/aoe.h + echo '#define AOE_DYNDEVS (${DYNDEVS})' \ + >> ${KDIR}/drivers/block/aoe/aoe.h + echo 'aoe-objs += aoedbg.o' \ + >> ${KDIR}/drivers/block/aoe/Makefile uninstall: @echo "Removing Module from $(INSTDIR)" diff --git a/NEWS b/NEWS index fb40cc1..4e4f9b1 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,14 @@ -*- change-log -*- +2009-04-09 Ed Cashin + avoid premature I/O failure: maintain timings on frame reassigment + +2009-02-25 Ed Cashin + support commas instead of spaces in aoe_iflist parameter + Roel Kluin: in skbfree, use skb if it's available on last iteration + +2009-02-06 Ed Cashin + fix the "kerninst" target for make, which had atrophied + 2009-02-03 Ed Cashin fix and refine compatibility tests version-70 diff --git a/conf/25-patches/fs5-none.diff b/conf/25-patches/fs5-none.diff index a6a02d4..3da48c9 100644 --- a/conf/25-patches/fs5-none.diff +++ b/conf/25-patches/fs5-none.diff @@ -1,7 +1,7 @@ diff -upr fs5/linux/drivers/block/aoe/aoedbg.c none/linux/drivers/block/aoe/aoedbg.c --- fs5/linux/drivers/block/aoe/aoedbg.c 2008-10-17 11:35:32.000000000 -0400 +++ none/linux/drivers/block/aoe/aoedbg.c 2008-10-17 11:51:51.000000000 -0400 -@@ -1,11 +1,58 @@ +@@ -1,11 +1,59 @@ #include #include -#include @@ -10,6 +10,7 @@ diff -upr fs5/linux/drivers/block/aoe/aoedbg.c none/linux/drivers/block/aoe/aoed +#include +#include +#include ++#include #include "aoe.h" #define SUBBUF_SIZE 262144 diff --git a/conf/25-patches/none-relay5.diff b/conf/25-patches/none-relay5.diff index 54a787c..b3155ba 100644 --- a/conf/25-patches/none-relay5.diff +++ b/conf/25-patches/none-relay5.diff @@ -1,7 +1,7 @@ diff -upr none/linux/drivers/block/aoe/aoedbg.c relay5/linux/drivers/block/aoe/aoedbg.c --- none/linux/drivers/block/aoe/aoedbg.c 2008-10-17 11:51:51.000000000 -0400 +++ relay5/linux/drivers/block/aoe/aoedbg.c 2008-10-17 11:10:02.000000000 -0400 -@@ -1,58 +1,12 @@ +@@ -1,59 +1,12 @@ #include #include -#include @@ -9,6 +9,7 @@ diff -upr none/linux/drivers/block/aoe/aoedbg.c relay5/linux/drivers/block/aoe/a -#include -#include -#include +-#include +#include +#include #include "aoe.h" diff --git a/conf/25-patches/none-relay6.diff b/conf/25-patches/none-relay6.diff index 3f0a1ba..dfbd28c 100644 --- a/conf/25-patches/none-relay6.diff +++ b/conf/25-patches/none-relay6.diff @@ -1,7 +1,7 @@ diff -upr none/linux/drivers/block/aoe/aoedbg.c relay6/linux/drivers/block/aoe/aoedbg.c --- none/linux/drivers/block/aoe/aoedbg.c 2008-10-17 11:51:51.000000000 -0400 +++ relay6/linux/drivers/block/aoe/aoedbg.c 2008-10-17 09:37:31.000000000 -0400 -@@ -1,58 +1,12 @@ +@@ -1,59 +1,12 @@ #include #include -#include @@ -9,6 +9,7 @@ diff -upr none/linux/drivers/block/aoe/aoedbg.c relay6/linux/drivers/block/aoe/a -#include -#include -#include +-#include +#include +#include #include "aoe.h" diff --git a/conf/8-patches/old-new.diff b/conf/8-patches/old-new.diff index 1830d2b..27514be 100644 --- a/conf/8-patches/old-new.diff +++ b/conf/8-patches/old-new.diff @@ -1,17 +1,22 @@ -diff -upr b/linux/drivers/block/aoe/aoe.h a/linux/drivers/block/aoe/aoe.h ---- b/linux/drivers/block/aoe/aoe.h 2007-01-23 14:14:30.000000000 -0500 -+++ a/linux/drivers/block/aoe/aoe.h 2007-01-23 13:41:13.000000000 -0500 -@@ -213,6 +213,3 @@ unsigned long long mac_addr(char addr[6] - /* for compatibility with older 2.6 kernels lacking kcalloc +diff --git a/linux/drivers/block/aoe/aoe.h b/linux/drivers/block/aoe/aoe.h +index ece38d3..dc3be54 100644 +--- a/linux/drivers/block/aoe/aoe.h ++++ b/linux/drivers/block/aoe/aoe.h +@@ -253,9 +253,6 @@ unsigned long long mac_addr(char addr[6]); */ extern void *aoe_kcalloc(size_t, size_t, int); -- + -/* compatibility with pre-2.6.9 kernels */ -unsigned long msleep_interruptible(unsigned int msecs); -diff -upr b/linux/drivers/block/aoe/aoechr.c a/linux/drivers/block/aoe/aoechr.c ---- b/linux/drivers/block/aoe/aoechr.c 2007-01-23 14:13:18.000000000 -0500 -+++ a/linux/drivers/block/aoe/aoechr.c 2006-10-31 15:59:40.000000000 -0500 -@@ -65,47 +65,6 @@ interfaces(const char __user *str, size_ +- + #define AOEDBG_ACTIVE 0 + void __init aoedbg_init(void); + void aoedbg_print(char *fmt, ...); +diff --git a/linux/drivers/block/aoe/aoechr.c b/linux/drivers/block/aoe/aoechr.c +index 3eb619b..b542143 100644 +--- a/linux/drivers/block/aoe/aoechr.c ++++ b/linux/drivers/block/aoe/aoechr.c +@@ -72,47 +72,6 @@ interfaces(const char __user *str, size_t size) return 0; } diff --git a/linux/Documentation/aoe/aoe.txt b/linux/Documentation/aoe/aoe.txt index 4c40d50..01739ba 100644 --- a/linux/Documentation/aoe/aoe.txt +++ b/linux/Documentation/aoe/aoe.txt @@ -122,7 +122,9 @@ DRIVER OPTIONS The aoe_deadsecs module parameter determines the maximum number of seconds that the driver will wait for an AoE device to provide a response to an AoE command. After aoe_deadsecs seconds have - elapsed, the AoE device will be marked as "down". + elapsed, the AoE device will be marked as "down". A value of zero + is supported for testing purposes and makes the aoe driver keep + trying AoE commands forever. The aoe_maxout module parameter has a default of 128. This is the maximum number of unresponded packets that will be sent to an AoE diff --git a/linux/drivers/block/aoe/aoe.h b/linux/drivers/block/aoe/aoe.h index abb15af..80c1dbe 100644 --- a/linux/drivers/block/aoe/aoe.h +++ b/linux/drivers/block/aoe/aoe.h @@ -1,11 +1,11 @@ -/* Copyright (c) 2008 Coraid, Inc. See COPYING for GPL terms. */ -#define VERSION "70" +/* Copyright (c) 2009 Coraid, Inc. See COPYING for GPL terms. */ +#define VERSION "71pre1" #define AOE_MAJOR 152 #define DEVICE_NAME "aoe" /* AOE_PARTITIONS and DEVSUBDIR are set in the Makefile */ -#define WHITESPACE " \t\v\f\n" +#define WHITESPACE " \t\v\f\n," /* for compatibility, so that this driver builds for kernels with * or without AoE already in them */ diff --git a/linux/drivers/block/aoe/aoeblk.c b/linux/drivers/block/aoe/aoeblk.c index 677584e..7323084 100644 --- a/linux/drivers/block/aoe/aoeblk.c +++ b/linux/drivers/block/aoe/aoeblk.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2009 Coraid, Inc. See COPYING for GPL terms. */ /* * aoeblk.c * block device routines diff --git a/linux/drivers/block/aoe/aoechr.c b/linux/drivers/block/aoe/aoechr.c index b542143..256e04e 100644 --- a/linux/drivers/block/aoe/aoechr.c +++ b/linux/drivers/block/aoe/aoechr.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2009 Coraid, Inc. See COPYING for GPL terms. */ /* * aoechr.c * AoE character device driver diff --git a/linux/drivers/block/aoe/aoecmd.c b/linux/drivers/block/aoe/aoecmd.c index d8eb28d..741dd82 100644 --- a/linux/drivers/block/aoe/aoecmd.c +++ b/linux/drivers/block/aoe/aoecmd.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2009 Coraid, Inc. See COPYING for GPL terms. */ /* * aoecmd.c * Filesystem request handling methods @@ -616,6 +616,8 @@ reassign_frame(struct frame *f) nf->bv = f->bv; nf->bv_off = f->bv_off; nf->waited = 0; + nf->waited_total = f->waited_total; + nf->sent = f->sent; f->skb = skb; return nf; @@ -798,7 +800,9 @@ rexmit_timer(ulong vp) since = tsince_hr(f); n = f->waited_total + since; n /= USEC_PER_SEC; - if (n > aoe_deadsecs && !(f->flags & FFL_PROBE)) { + if (aoe_deadsecs + && n > aoe_deadsecs + && !(f->flags & FFL_PROBE)) { /* We have waited too long retransmitting, and it's time to fail the device. @@ -817,7 +821,7 @@ rexmit_timer(ulong vp) t = f->t; n = f->waited + since; n /= USEC_PER_SEC; - if (utgts > 0 && n > aoe_deadsecs / utgts) + if (aoe_deadsecs && utgts > 0 && n > aoe_deadsecs / utgts) scorn(t); /* avoid this target */ t->lost += 1; /* (decremented on unexpected response) */ @@ -1182,8 +1186,10 @@ noskb: if (buf) case WIN_READ_EXT: if (skb->len < n) { printk(KERN_ERR - "aoe: runt data size in read. skb->len=%d need=%ld\n", - skb->len, n); + "aoe: runt data size in read from e%ld.%d." + " skb->len=%d need=%ld\n", + (long) d->aoemajor, d->aoeminor, + skb->len, n); clear_bit(BIO_UPTODATE, &buf->bio->bi_flags); break; } @@ -1199,7 +1205,9 @@ noskb: if (buf) case WIN_IDENTIFY: if (skb->len < 512) { printk(KERN_INFO - "aoe: runt data size in ataid. skb->len=%d\n", + "aoe: runt data size in ataid from e%ld.%d." + " skb->len=%d need=512\n", + (long) d->aoemajor, d->aoeminor, skb->len); break; } diff --git a/linux/drivers/block/aoe/aoedev.c b/linux/drivers/block/aoe/aoedev.c index ab83022..8466628 100644 --- a/linux/drivers/block/aoe/aoedev.c +++ b/linux/drivers/block/aoe/aoedev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2009 Coraid, Inc. See COPYING for GPL terms. */ /* * aoedev.c * AoE device utility functions; maintains device list. @@ -410,7 +410,7 @@ skbfree(struct sk_buff *skb) return; while (atomic_read(&skb_shinfo(skb)->dataref) != 1 && i-- > 0) msleep_interruptible(Sms); - if (i <= 0) { + if (i < 0) { printk(KERN_ERR "aoe: %s holds ref: cannot free skb -- memory leaked.\n", skb->dev ? skb->dev->name : "netif"); diff --git a/linux/drivers/block/aoe/aoemain.c b/linux/drivers/block/aoe/aoemain.c index e3317c8..a35ce57 100644 --- a/linux/drivers/block/aoe/aoemain.c +++ b/linux/drivers/block/aoe/aoemain.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2009 Coraid, Inc. See COPYING for GPL terms. */ /* * aoemain.c * Module initialization routines, discover timer diff --git a/linux/drivers/block/aoe/aoenet.c b/linux/drivers/block/aoe/aoenet.c index 4082dd4..b70e5aa 100644 --- a/linux/drivers/block/aoe/aoenet.c +++ b/linux/drivers/block/aoe/aoenet.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2009 Coraid, Inc. See COPYING for GPL terms. */ /* * aoenet.c * Ethernet portion of AoE driver @@ -30,7 +30,7 @@ enum { static char aoe_iflist[IFLISTSZ]; module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600); -MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=\"dev1 [dev2 ...]\"\n"); +MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=dev1[,dev2...]\n"); static wait_queue_head_t txwq; static struct ktstate kts;