aoe [02/14]: update copyright date
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): E1GQ6uv-0001qi-00@kokone
PATCH 1/1 aoe [02/14]: update copyright date
Update the copyright year to 2006.
---
drivers/block/aoe/aoe.h +1 -1
@@ -1,4 +1,4 @@ -/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ #define VERSION "22"#define AOE_MAJOR 152#define DEVICE_NAME "aoe"
drivers/block/aoe/aoeblk.c +1 -1
@@ -1,4 +1,4 @@ -/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ /* * aoeblk.c * block device routines
drivers/block/aoe/aoechr.c +1 -1
@@ -1,4 +1,4 @@ -/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ /* * aoechr.c * AoE character device driver
drivers/block/aoe/aoecmd.c +1 -1
@@ -1,4 +1,4 @@ -/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ /* * aoecmd.c * Filesystem request handling methods
drivers/block/aoe/aoedev.c +1 -1
@@ -1,4 +1,4 @@ -/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ /* * aoedev.c * AoE device utility functions; maintains device list.
drivers/block/aoe/aoemain.c +1 -1
@@ -1,4 +1,4 @@ -/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ /* * aoemain.c * Module initialization routines, discover timer
drivers/block/aoe/aoenet.c +1 -1
@@ -1,4 +1,4 @@ -/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ +/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ /* * aoenet.c * Ethernet portion of AoE driver
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [06/14]: clean up printks via macros
In reply to a message not in the archiveUse simple macros to clean up the printks. (This patch is reverted by the 14th patch to follow.)
---
drivers/block/aoe/aoe.h +5 -0
@@ -10,6 +10,11 @@#define AOE_PARTITIONS (16)#endif +#define xprintk(L, fmt, arg...) printk(L "aoe: " "%s: " fmt, __func__, ## arg) +#define iprintk(fmt, arg...) xprintk(KERN_INFO, fmt, ## arg) +#define eprintk(fmt, arg...) xprintk(KERN_ERR, fmt, ## arg) +#define dprintk(fmt, arg...) xprintk(KERN_DEBUG, fmt, ## arg) +#define SYSMINOR (aoemajor, aoeminor) ((aoemajor) * NPERSHELF + (aoeminor))#define AOEMAJOR (sysminor) ((sysminor) / NPERSHELF)#define AOEMINOR (sysminor) ((sysminor) % NPERSHELF)
drivers/block/aoe/aoeblk.c +7 -9
@@ -132,8 +132,7 @@ aoeblk_make_request(request_queue_t *q, d = bio->bi_bdev->bd_disk->private_data; buf =mempool_alloc (d->bufpool,GFP_NOIO );if (buf ==NULL ) { -printk (KERN_INFO "aoe: aoeblk_make_request: buf allocation " -"failure\n" ); +iprintk ("buf allocation failure\n" );bio_endio (bio, bio->bi_size, -ENOMEM );return 0 ; }
@@ -150,8 +149,7 @@ aoeblk_make_request(request_queue_t *q,spin_lock_irqsave (&d->lock, flags);if ((d->flags &DEVFL_UP ) ==0 ) { -printk (KERN_INFO "aoe: aoeblk_make_request: device %ld.%ld is not up\n" , - d->aoemajor, d->aoeminor); +iprintk ("device %ld.%ld is not up\n" , d->aoemajor, d->aoeminor);spin_unlock_irqrestore (&d->lock, flags);mempool_free (buf, d->bufpool);bio_endio (bio, bio->bi_size, -ENXIO );
@@ -176,7 +174,7 @@ aoeblk_getgeo(struct block_device *bdev,struct aoedev *d = bdev->bd_disk->private_data;if ((d->flags &DEVFL_UP ) ==0 ) { -printk (KERN_ERR "aoe: aoeblk_ioctl: disk not up\n" ); +eprintk ("disk not up\n" );return -ENODEV ; }
@@ -203,8 +201,8 @@ aoeblk_gdalloc(void *vp) gd =alloc_disk (AOE_PARTITIONS );if (gd ==NULL ) { -printk (KERN_ERR "aoe: aoeblk_gdalloc: cannot allocate disk " -"structure for %ld.%ld\n" , d->aoemajor, d->aoeminor); +eprintk ("cannot allocate disk structure for %ld.%ld\n" , + d->aoemajor, d->aoeminor);spin_lock_irqsave (&d->lock, flags); d->flags &= ~DEVFL_GDALLOC ;spin_unlock_irqrestore (&d->lock, flags);
@@ -213,8 +211,8 @@ aoeblk_gdalloc(void *vp) d->bufpool =mempool_create_slab_pool (MIN_BUFS , buf_pool_cache);if (d->bufpool ==NULL ) { -printk (KERN_ERR "aoe: aoeblk_gdalloc: cannot allocate bufpool " -"for %ld.%ld\n" , d->aoemajor, d->aoeminor); +eprintk ("cannot allocate bufpool for %ld.%ld\n" , + d->aoemajor, d->aoeminor);put_disk (gd);spin_lock_irqsave (&d->lock, flags); d->flags &= ~DEVFL_GDALLOC ;
drivers/block/aoe/aoechr.c +5 -8
@@ -55,9 +55,7 @@ static int interfaces(const char __user *str, size_t size) { if (set_aoe_iflist(str, size)) { -printk (KERN_CRIT -"%s: could not set interface list: %s\n" , - __FUNCTION__,"too many interfaces" ); +eprintk ("could not set interface list: too many interfaces\n" );return -EINVAL ; }return 0 ;
@@ -80,8 +78,7 @@ revalidate(const char __user *str, size_/* should be e%d.%d format */ n =sscanf (buf,"e%d.%d" , &major, &minor);if (n !=2 ) { -printk (KERN_ERR "aoe: %s: invalid device specification\n" , - __FUNCTION__); +eprintk ("invalid device specification\n" );return -EINVAL ; } d =aoedev_by_aoeaddr (major, minor);
@@ -116,7 +113,7 @@ bail: spin_unlock_irqrestore(&emsgs_loc mp =kmalloc (n,GFP_ATOMIC );if (mp ==NULL ) { -printk (KERN_CRIT "aoe: aoechr_error: allocation failure, len=%ld\n" , n); +eprintk ("allocation failure, len=%ld\n" , n); goto bail; }
@@ -141,7 +138,7 @@ aoechr_write(struct file *filp, const chswitch ((unsigned long ) filp->private_data) {default : -printk (KERN_INFO "aoe: aoechr_write: can't write to that file.\n" ); +iprintk ("can't write to that file.\n" );break ;case MINOR_DISCOVER : ret =discover ();
@@ -250,7 +247,7 @@ aoechr_init(void) n =register_chrdev (AOE_MAJOR ,"aoechr" , &aoe_fops);if (n <0 ) { -printk (KERN_ERR "aoe: aoechr_init: can't register char device\n" ); +eprintk ("can't register char device\n" );return n; }sema_init (&emsgs_sema,0 );
drivers/block/aoe/aoecmd.c +26 -31
149 lines not on this page · raw message
drivers/block/aoe/aoedev.c +1 -1
@@ -155,7 +155,7 @@ aoedev_by_sysminor_m(ulong sysminor, ulo d =aoedev_newdev (bufcnt);if (d ==NULL ) {spin_unlock_irqrestore (&devlist_lock, flags); -printk (KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n" ); +iprintk ("aoedev_newdev failure.\n" );return NULL ; } d->sysminor = sysminor;
drivers/block/aoe/aoemain.c +3 -5
@@ -84,13 +84,11 @@ aoe_init(void) goto net_fail; ret =register_blkdev (AOE_MAJOR ,DEVICE_NAME );if (ret <0 ) { -printk (KERN_ERR "aoe: aoeblk_init: can't register major\n" ); +eprintk ("can't register major\n" ); goto blkreg_fail; } -printk (KERN_INFO -"aoe: aoe_init: AoE v%s initialised.\n" , -VERSION ); +iprintk ("AoE v%s initialised.\n" ,VERSION );discover_timer (TINIT );return 0 ;
@@ -103,7 +101,7 @@ aoe_init(void) chr_fail:aoedev_exit (); -printk (KERN_INFO "aoe: aoe_init: initialisation failure.\n" ); +iprintk ("initialisation failure.\n" );return ret; }
drivers/block/aoe/aoenet.c +3 -4
@@ -74,7 +74,7 @@ set_aoe_iflist(const char __user *user_sreturn -EINVAL ;if (copy_from_user (aoe_iflist, user_str, size)) { -printk (KERN_INFO "aoe: %s: copy from user failed\n" , __FUNCTION__); +iprintk ("copy from user failed\n" );return -EFAULT ; } aoe_iflist[size] =0x00 ;
@@ -132,8 +132,7 @@ aoenet_rcv(struct sk_buff *skb, struct nif (n >NECODES ) n =0 ;if (net_ratelimit ()) -printk (KERN_ERR "aoe: aoenet_rcv: error packet from %d.%d; " -"ecode=%d '%s'\n" , +eprintk ("error packet from %d.%d; ecode=%d '%s'\n" ,be16_to_cpu (h->major), h->minor, h->err, aoe_errlist[n]); goto exit;
@@ -147,7 +146,7 @@ aoenet_rcv(struct sk_buff *skb, struct naoecmd_cfg_rsp (skb);break ;default : -printk (KERN_INFO "aoe: aoenet_rcv: unknown cmd %d\n" , h->cmd); +iprintk ("unknown cmd %d\n" , h->cmd); } exit:dev_kfree_skb (skb);
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [03/14]: remove unused NARGS enum
In reply to a message not in the archiveThe NARGS enum is left over from older code versions.
---
drivers/block/aoe/aoechr.c +0 -1
@@ -15,7 +15,6 @@ enum {MINOR_INTERFACES ,MINOR_REVALIDATE ,MSGSZ =2048 , -NARGS =10 , NMSG = 100, /* message backlog to retain */ };
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [04/14]: zero copy write 1 of 2
In reply to a message not in the archiveAvoid memory copy on writes.
(This patch depends on fixes in patch 9 to follow.)
Although skb->len should not be set when working with linear skbuffs, the skb->tail pointer maintained by skb_put/skb_trim is not relevant to what happens when the skb_fill_page_desc function is called. This issue was raised without comment in linux-kernel and netdev earlier this month:
http://thread.gmane.org/gmane.linux.kernel/446474/
http://thread.gmane.org/gmane.linux.network/45444/
So until there is something analogous to skb_put that works for zero-copy write skbuffs, we will do what the other callers of skb_fill_page_desc are doing.
---
drivers/block/aoe/aoe.h +2 -5
@@ -107,11 +107,7 @@ struct frame {ulong waited;struct buf *buf;char *bufaddr; -int writedatalen; -int ndata; - -/* largest possible */ -unsigned char data[sizeof (struct aoe_hdr ) +sizeof (struct aoe_atahdr )]; +struct sk_buff *skb; };struct aoedev {
@@ -157,6 +153,7 @@ void aoecmd_cfg(ushort aoemajor, unsignevoid aoecmd_ata_rsp (struct sk_buff *);void aoecmd_cfg_rsp (struct sk_buff *);void aoecmd_sleepwork (void *vp); +struct sk_buff *new_skb (ulong );int aoedev_init (void );void aoedev_exit (void );
drivers/block/aoe/aoecmd.c +37 -57
176 lines not on this page · raw message
drivers/block/aoe/aoedev.c +30 -12
63 lines not on this page · raw message
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [05/14]: jumbo frame support 1 of 2
In reply to a message not in the archiveAdd support for jumbo ethernet frames.
(This patch depends on patch 7 to follow.)
---
drivers/block/aoe/aoe.h +8 -3
@@ -65,7 +65,7 @@ struct aoe_atahdr {struct aoe_cfghdr {__be16 bufcnt;__be16 fwver; -unsigned char res; +unsigned char scnt;unsigned char aoeccmd;unsigned char cslen[2 ]; };
@@ -78,12 +78,13 @@ enum {DEVFL_GDALLOC = (1 <<4 ),/* need to alloc gendisk */ DEVFL_PAUSE = (1 <<5 ),DEVFL_NEWSIZE = (1 <<6 ),/* need to update dev size in block layer */ +DEVFL_MAXBCNT = (1 <<7 ),/* d->maxbcnt is not changeable */ BUFFL_FAIL = 1, };enum { -MAXATADATA =1024 , +DEFAULTBCNT =2 *512 ,/* 2 sectors */ NPERSHELF =16 ,/* number of slots per shelf address */ FREETAG =-1 , MIN_BUFS = 8,
@@ -107,6 +108,8 @@ struct frame {ulong waited;struct buf *buf;char *bufaddr; +ulong bcnt; +sector_t lba;struct sk_buff *skb; };
@@ -120,6 +123,7 @@ struct aoedev {ulong nopen;/* (bd_openers isn't available without sleeping) */ ulong rttavg;/* round trip average of requests/responses */ u16 fw_ver;/* version of blade's firmware */ +u16 maxbcnt;struct work_struct work;/* disk create work struct */ struct gendisk *gd;request_queue_t blkq;
@@ -134,7 +138,8 @@ struct aoedev {struct list_head bufq;/* queue of bios to work on */ struct buf *inprocess;/* the one we're currently working on */ ulong lasttag;/* last tag sent */ -ulong nframes;/* number of frames below */ +ushort lostjumbo; +ushort nframes;/* number of frames below */ struct frame *frames; };
drivers/block/aoe/aoechr.c +1 -0
@@ -89,6 +89,7 @@ revalidate(const char __user *str, size_return -EINVAL ;spin_lock_irqsave (&d->lock, flags); + d->flags &= ~DEVFL_MAXBCNT ; d->flags |=DEVFL_PAUSE ;spin_unlock_irqrestore (&d->lock, flags);aoecmd_cfg (major, minor);
drivers/block/aoe/aoecmd.c +63 -14
153 lines not on this page · raw message
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [07/14]: jumbo frame support 2 of 2
In reply to a message not in the archiveAdd support for jumbo ethernet frames.
(This patch follows patch 5.)
---
drivers/block/aoe/aoecmd.c +6 -2
@@ -475,7 +475,7 @@ void aoecmd_ata_rsp(struct sk_buff *skb) {struct aoedev *d; -struct aoe_hdr *hin; +struct aoe_hdr *hin, *hout;struct aoe_atahdr *ahin, *ahout;struct frame *f;struct buf *buf;
@@ -515,7 +515,8 @@ aoecmd_ata_rsp(struct sk_buff *skb)calc_rttavg (d,tsince (f->tag)); ahin = (struct aoe_atahdr *) (hin+1 ); - ahout = (struct aoe_atahdr *) (f->skb->mac.raw +sizeof (struct aoe_hdr )); + hout = (struct aoe_hdr *) f->skb->mac.raw; + ahout = (struct aoe_atahdr *) (hout+1 ); buf = f->buf;if (ahout->cmdstat ==WIN_IDENTIFY )
@@ -552,6 +553,9 @@ aoecmd_ata_rsp(struct sk_buff *skb)skb_fill_page_desc (f->skb,0 ,virt_to_page (f->bufaddr),offset_in_page (f->bufaddr), n); + f->tag =newtag (d); + hout->tag =cpu_to_be32 (f->tag); + skb->dev = d->ifp;skb_get (f->skb); f->skb->next =NULL ;spin_unlock_irqrestore (&d->lock, flags);
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [08/14]: improve retransmission heuristics
In reply to a message not in the archiveAdd a dynamic minimum timer for better retransmission behavior.
---
drivers/block/aoe/aoe.h +4 -3
@@ -125,8 +125,10 @@ struct aoedev {ulong sysminor;ulong aoemajor;ulong aoeminor; -ulong nopen;/* (bd_openers isn't available without sleeping) */ -ulong rttavg;/* round trip average of requests/responses */ +u16 nopen;/* (bd_openers isn't available without sleeping) */ +u16 lasttag;/* last tag sent */ +u16 rttavg;/* round trip average of requests/responses */ +u16 mintimer;u16 fw_ver;/* version of blade's firmware */ u16 maxbcnt;struct work_struct work;/* disk create work struct */
@@ -142,7 +144,6 @@ struct aoedev {mempool_t *bufpool;/* for deadlock-free Buf allocation */ struct list_head bufq;/* queue of bios to work on */ struct buf *inprocess;/* the one we're currently working on */ -ulong lasttag;/* last tag sent */ ushort lostjumbo;ushort nframes;/* number of frames below */ struct frame *frames;
drivers/block/aoe/aoecmd.c +13 -3
@@ -461,8 +461,15 @@ calc_rttavg(struct aoedev *d, int rtt) registerlong n; n = rtt; -if (n <MINTIMER ) - n =MINTIMER ; +if (n <0 ) { + n = -rtt; +if (n <MINTIMER ) + n =MINTIMER ; +else if (n >MAXTIMER ) + n =MAXTIMER ; + d->mintimer += (n - d->mintimer) >>1 ; + }else if (n < d->mintimer) + n = d->mintimer;else if (n >MAXTIMER ) n =MAXTIMER ;
@@ -498,8 +505,10 @@ aoecmd_ata_rsp(struct sk_buff *skb)spin_lock_irqsave (&d->lock, flags); - f =getframe (d,be32_to_cpu (hin->tag)); + n =be32_to_cpu (hin->tag); + f =getframe (d, n);if (f ==NULL ) { +calc_rttavg (d, -tsince (n));spin_unlock_irqrestore (&d->lock, flags); snprintf(ebuf, sizeof ebuf, "%15s e%d.%d tag=%08x@%08lx\n",
@@ -724,6 +733,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb)return ; } d->flags |=DEVFL_PAUSE ;/* force pause */ + d->mintimer =MINTIMER ; d->fw_ver =be16_to_cpu (ch->fwver);/* check for already outstanding ataid */
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [13/14]: update driver version
In reply to a message not in the archiveUpdate aoe driver version number to 32.
---
drivers/block/aoe/aoe.h +1 -1
@@ -1,5 +1,5 @@/* Copyright (c) 2006 Coraid, Inc. See COPYING for GPL terms. */ -#define VERSION "22" +#define VERSION "32"#define AOE_MAJOR 152#define DEVICE_NAME "aoe"
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [09/14]: zero copy write 2 of 2
In reply to a message not in the archiveAvoid memory copy on writes.
(This patch follows patch 4.)
---
drivers/block/aoe/aoe.h +1 -0
@@ -84,6 +84,7 @@ enum {DEVFL_PAUSE = (1 <<5 ),DEVFL_NEWSIZE = (1 <<6 ),/* need to update dev size in block layer */ DEVFL_MAXBCNT = (1 <<7 ),/* d->maxbcnt is not changeable */ +DEVFL_KICKME = (1 <<8 ), BUFFL_FAIL = 1, };
drivers/block/aoe/aoecmd.c +62 -20
181 lines not on this page · raw message
drivers/block/aoe/aoedev.c +1 -0
@@ -121,6 +121,7 @@ aoedev_downdev(struct aoedev *d)mempool_free (buf, d->bufpool);bio_endio (bio, bio->bi_size, -EIO ); } +skb_shinfo (f->skb)->nr_frags = f->skb->data_len =0 ; } d->inprocess =NULL ;
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [10/14]: module parameter for device timeout
In reply to a message not in the archiveThe aoe_deadsecs module parameter sets the number of seconds that elapse before a nonresponsive AoE device is marked as dead.
This is runtime settable in sysfs or settable with a module load or kernel boot parameter.
---
drivers/block/aoe/aoecmd.c +5 -2
@@ -15,7 +15,10 @@#define TIMERTICK (HZ / 10)#define MINTIMER (2 * TIMERTICK)#define MAXTIMER (HZ << 1) -#define MAXWAIT (60 * 3)/* After MAXWAIT seconds, give up and fail dev */ + +static int aoe_deadsecs =60 *3 ; +module_param (aoe_deadsecs, int,0644 ); +MODULE_PARM_DESC (aoe_deadsecs,"After aoe_deadsecs seconds, give up and fail dev." );struct sk_buff *new_skb (ulong len)
@@ -373,7 +376,7 @@ rexmit_timer(ulong vp)if (f->tag !=FREETAG &&tsince (f->tag) >= timeout) { n = f->waited += timeout; n /=HZ ; -if (n >MAXWAIT ) {/* waited too long. device failure. */ +if (n > aoe_deadsecs) {/* waited too long for response */ aoedev_downdev (d);break ; }
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [14/14]: revert printk macros
In reply to a message not in the archiveThis patch addresses the concern that the aoe driver should not introduce unecessary conventions that must be learned by the reader. It reverts patch 6.
---
drivers/block/aoe/aoe.h +0 -5
@@ -10,11 +10,6 @@#define AOE_PARTITIONS (16)#endif -#define xprintk(L, fmt, arg...) printk(L "aoe: " "%s: " fmt, __func__, ## arg) -#define iprintk(fmt, arg...) xprintk(KERN_INFO, fmt, ## arg) -#define eprintk(fmt, arg...) xprintk(KERN_ERR, fmt, ## arg) -#define dprintk(fmt, arg...) xprintk(KERN_DEBUG, fmt, ## arg) -#define SYSMINOR (aoemajor, aoeminor) ((aoemajor) * NPERSHELF + (aoeminor))#define AOEMAJOR (sysminor) ((sysminor) / NPERSHELF)#define AOEMINOR (sysminor) ((sysminor) % NPERSHELF)
drivers/block/aoe/aoeblk.c +6 -5
@@ -131,7 +131,7 @@ aoeblk_make_request(request_queue_t *q, d = bio->bi_bdev->bd_disk->private_data; buf =mempool_alloc (d->bufpool,GFP_NOIO );if (buf ==NULL ) { -iprintk ("buf allocation failure\n" ); +printk (KERN_INFO "aoe: buf allocation failure\n" );bio_endio (bio, bio->bi_size, -ENOMEM );return 0 ; }
@@ -149,7 +149,8 @@ aoeblk_make_request(request_queue_t *q,spin_lock_irqsave (&d->lock, flags);if ((d->flags &DEVFL_UP ) ==0 ) { -iprintk ("device %ld.%ld is not up\n" , d->aoemajor, d->aoeminor); +printk (KERN_INFO "aoe: device %ld.%ld is not up\n" , + d->aoemajor, d->aoeminor);spin_unlock_irqrestore (&d->lock, flags);mempool_free (buf, d->bufpool);bio_endio (bio, bio->bi_size, -ENXIO );
@@ -174,7 +175,7 @@ aoeblk_getgeo(struct block_device *bdev,struct aoedev *d = bdev->bd_disk->private_data;if ((d->flags &DEVFL_UP ) ==0 ) { -eprintk ("disk not up\n" ); +printk (KERN_ERR "aoe: disk not up\n" );return -ENODEV ; }
@@ -201,7 +202,7 @@ aoeblk_gdalloc(void *vp) gd =alloc_disk (AOE_PARTITIONS );if (gd ==NULL ) { -eprintk ("cannot allocate disk structure for %ld.%ld\n" , +printk (KERN_ERR "aoe: cannot allocate disk structure for %ld.%ld\n" , d->aoemajor, d->aoeminor);spin_lock_irqsave (&d->lock, flags); d->flags &= ~DEVFL_GDALLOC ;
@@ -211,7 +212,7 @@ aoeblk_gdalloc(void *vp) d->bufpool =mempool_create_slab_pool (MIN_BUFS , buf_pool_cache);if (d->bufpool ==NULL ) { -eprintk ("cannot allocate bufpool for %ld.%ld\n" , +printk (KERN_ERR "aoe: cannot allocate bufpool for %ld.%ld\n" , d->aoemajor, d->aoeminor);put_disk (gd);spin_lock_irqsave (&d->lock, flags);
drivers/block/aoe/aoechr.c +6 -5
@@ -55,7 +55,8 @@ static int interfaces(const char __user *str, size_t size) { if (set_aoe_iflist(str, size)) { -eprintk ("could not set interface list: too many interfaces\n" ); +printk (KERN_ERR +"aoe: could not set interface list: too many interfaces\n" );return -EINVAL ; }return 0 ;
@@ -78,7 +79,7 @@ revalidate(const char __user *str, size_/* should be e%d.%d format */ n =sscanf (buf,"e%d.%d" , &major, &minor);if (n !=2 ) { -eprintk ("invalid device specification\n" ); +printk (KERN_ERR "aoe: invalid device specification\n" );return -EINVAL ; } d =aoedev_by_aoeaddr (major, minor);
@@ -113,7 +114,7 @@ bail: spin_unlock_irqrestore(&emsgs_loc mp =kmalloc (n,GFP_ATOMIC );if (mp ==NULL ) { -eprintk ("allocation failure, len=%ld\n" , n); +printk (KERN_ERR "aoe: allocation failure, len=%ld\n" , n); goto bail; }
@@ -138,7 +139,7 @@ aoechr_write(struct file *filp, const chswitch ((unsigned long ) filp->private_data) {default : -iprintk ("can't write to that file.\n" ); +printk (KERN_INFO "aoe: can't write to that file.\n" );break ;case MINOR_DISCOVER : ret =discover ();
@@ -247,7 +248,7 @@ aoechr_init(void) n =register_chrdev (AOE_MAJOR ,"aoechr" , &aoe_fops);if (n <0 ) { -eprintk ("can't register char device\n" ); +printk (KERN_ERR "aoe: can't register char device\n" );return n; }sema_init (&emsgs_sema,0 );
drivers/block/aoe/aoecmd.c +20 -15
@@ -159,7 +159,7 @@ aoecmd_ata_rw(struct aoedev *d, struct f buf->nframesout +=1 ; buf->bufaddr += bcnt; buf->bv_resid -= bcnt; -/* dprintk("bv_resid=%ld\n", buf->bv_resid); */ +/* printk(KERN_DEBUG "aoe: bv_resid=%ld\n", buf->bv_resid); */ buf->resid -= bcnt; buf->sector += bcnt >>9 ;if (buf->resid ==0 ) {
@@ -203,7 +203,7 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigne skb =new_skb (sizeof *h +sizeof *ch);if (skb ==NULL ) { -iprintk ("skb alloc failure\n" ); +printk (KERN_INFO "aoe: skb alloc failure\n" );continue ; } skb->dev = ifp;
@@ -276,7 +276,7 @@ loop:return ; buf = container_of(d->bufq.next, struct buf, bufs);list_del (d->bufq.next); -/*dprintk("bi_size=%ld\n", buf->bio->bi_size); */ +/*printk(KERN_DEBUG "aoe: bi_size=%ld\n", buf->bio->bi_size); */ d->inprocess = buf; }aoecmd_ata_rw (d, f);
@@ -319,7 +319,7 @@ rexmit(struct aoedev *d, struct frame *f }if (++d->lostjumbo > (d->nframes <<1 ))if (d->maxbcnt !=DEFAULTBCNT ) { -iprintk ("e%ld.%ld: too many lost jumbo on %s - using 1KB frames.\n" , +printk (KERN_INFO "aoe: e%ld.%ld: too many lost jumbo on %s - using 1KB frames.\n" , d->aoemajor, d->aoeminor, d->ifp->name); d->maxbcnt =DEFAULTBCNT ; d->flags |=DEVFL_MAXBCNT ;
@@ -472,7 +472,7 @@ ataid_complete(struct aoedev *d, unsigne }if (d->ssize != ssize) -iprintk ("%012llx e%lu.%lu v%04x has %llu sectors\n" , +printk (KERN_INFO "aoe: %012llx e%lu.%lu v%04x has %llu sectors\n" , (unsigned long long )mac_addr (d->addr), d->aoemajor, d->aoeminor, d->fw_ver, (long long )ssize);
@@ -483,7 +483,7 @@ ataid_complete(struct aoedev *d, unsigne d->flags |=DEVFL_NEWSIZE ; }else {if (d->flags &DEVFL_GDALLOC ) { -eprintk ("can't schedule work for e%lu.%lu, %s\n" , +printk (KERN_ERR "aoe: can't schedule work for e%lu.%lu, %s\n" , d->aoemajor, d->aoeminor,"it's already on! This shouldn't happen.\n" );return ;
@@ -569,7 +569,8 @@ aoecmd_ata_rsp(struct sk_buff *skb)if (ahout->cmdstat ==WIN_IDENTIFY ) d->flags &= ~DEVFL_PAUSE ;if (ahin->cmdstat &0xa9 ) {/* these bits cleared on success */ -eprintk ("ata error cmd=%2.2Xh stat=%2.2Xh from e%ld.%ld\n" , +printk (KERN_ERR +"aoe: ata error cmd=%2.2Xh stat=%2.2Xh from e%ld.%ld\n" , ahout->cmdstat, ahin->cmdstat, d->aoemajor, d->aoeminor);if (buf)
@@ -580,7 +581,8 @@ aoecmd_ata_rsp(struct sk_buff *skb)case WIN_READ :case WIN_READ_EXT :if (skb->len -sizeof *hin -sizeof *ahin < n) { -eprintk ("runt data size in read. skb->len=%d\n" , +printk (KERN_ERR +"aoe: runt data size in read. skb->len=%d\n" , skb->len);/* fail frame f? just returning will rexmit. */ spin_unlock_irqrestore (&d->lock, flags);
@@ -618,7 +620,8 @@ aoecmd_ata_rsp(struct sk_buff *skb)break ;case WIN_IDENTIFY :if (skb->len -sizeof *hin -sizeof *ahin <512 ) { -iprintk ("runt data size in ataid. skb->len=%d\n" , +printk (KERN_INFO +"aoe: runt data size in ataid. skb->len=%d\n" , skb->len);spin_unlock_irqrestore (&d->lock, flags);return ;
@@ -626,7 +629,8 @@ aoecmd_ata_rsp(struct sk_buff *skb)ataid_complete (d, (char *) (ahin+1 ));break ;default : -iprintk ("unrecognized ata command %2.2Xh for %d.%d\n" , +printk (KERN_INFO +"aoe: unrecognized ata command %2.2Xh for %d.%d\n" , ahout->cmdstat,be16_to_cpu (hin->major), hin->minor);
@@ -686,7 +690,7 @@ aoecmd_ata_id(struct aoedev *d) f =freeframe (d);if (f ==NULL ) { -eprintk ("can't get a frame. This shouldn't happen.\n" ); +printk (KERN_ERR "aoe: can't get a frame. This shouldn't happen.\n" );return NULL ; }
@@ -732,14 +736,14 @@ aoecmd_cfg_rsp(struct sk_buff *skb)*/ aoemajor =be16_to_cpu (h->major);if (aoemajor ==0xfff ) { -eprintk ("Warning: shelf address is all ones. " +printk (KERN_ERR "aoe: Warning: shelf address is all ones. " "Check shelf dip switches.\n" );return ; } sysminor =SYSMINOR (aoemajor, h->minor);if (sysminor *AOE_PARTITIONS +AOE_PARTITIONS >MINORMASK ) { -iprintk ("e%ld.%d: minor number too large\n" , +printk (KERN_INFO "aoe: e%ld.%d: minor number too large\n" , aoemajor, (int ) h->minor);return ; }
@@ -750,7 +754,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb) d =aoedev_by_sysminor_m (sysminor, n);if (d ==NULL ) { -iprintk ("device sysminor_m failure\n" ); +printk (KERN_INFO "aoe: device sysminor_m failure\n" );return ; }
@@ -767,7 +771,8 @@ aoecmd_cfg_rsp(struct sk_buff *skb) n = ch->scnt; n = n ? n *512 :DEFAULTBCNT ;if (n != d->maxbcnt) { -iprintk ("e%ld.%ld: setting %d byte data frames on %s\n" , +printk (KERN_INFO +"aoe: e%ld.%ld: setting %d byte data frames on %s\n" , d->aoemajor, d->aoeminor, n, d->ifp->name); d->maxbcnt = n; }
drivers/block/aoe/aoedev.c +1 -1
@@ -156,7 +156,7 @@ aoedev_by_sysminor_m(ulong sysminor, ulo d =aoedev_newdev (bufcnt);if (d ==NULL ) {spin_unlock_irqrestore (&devlist_lock, flags); -iprintk ("aoedev_newdev failure.\n" ); +printk (KERN_INFO "aoe: aoedev_newdev failure.\n" );return NULL ; } d->sysminor = sysminor;
drivers/block/aoe/aoemain.c +3 -3
@@ -84,11 +84,11 @@ aoe_init(void) goto net_fail; ret =register_blkdev (AOE_MAJOR ,DEVICE_NAME );if (ret <0 ) { -eprintk ("can't register major\n" ); +printk (KERN_ERR "aoe: can't register major\n" ); goto blkreg_fail; } -iprintk ("AoE v%s initialised.\n" ,VERSION ); +printk (KERN_INFO "aoe: AoE v%s initialised.\n" ,VERSION );discover_timer (TINIT );return 0 ;
@@ -101,7 +101,7 @@ aoe_init(void) chr_fail:aoedev_exit (); -iprintk ("initialisation failure.\n" ); +printk (KERN_INFO "aoe: initialisation failure.\n" );return ret; }
drivers/block/aoe/aoenet.c +3 -3
@@ -74,7 +74,7 @@ set_aoe_iflist(const char __user *user_sreturn -EINVAL ;if (copy_from_user (aoe_iflist, user_str, size)) { -iprintk ("copy from user failed\n" ); +printk (KERN_INFO "aoe: copy from user failed\n" );return -EFAULT ; } aoe_iflist[size] =0x00 ;
@@ -132,7 +132,7 @@ aoenet_rcv(struct sk_buff *skb, struct nif (n >NECODES ) n =0 ;if (net_ratelimit ()) -eprintk ("error packet from %d.%d; ecode=%d '%s'\n" , +printk (KERN_ERR "aoe: error packet from %d.%d; ecode=%d '%s'\n" ,be16_to_cpu (h->major), h->minor, h->err, aoe_errlist[n]); goto exit;
@@ -146,7 +146,7 @@ aoenet_rcv(struct sk_buff *skb, struct naoecmd_cfg_rsp (skb);break ;default : -iprintk ("unknown cmd %d\n" , h->cmd); +printk (KERN_INFO "aoe: unknown cmd %d\n" , h->cmd); } exit:dev_kfree_skb (skb);
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [11/14]: use bio->bi_idx
In reply to a message not in the archiveInstead of starting with bio->bi_io_vec, use the offset in bio->bi_idx.
---
drivers/block/aoe/aoeblk.c +2 -1
@@ -142,7 +142,8 @@ aoeblk_make_request(request_queue_t *q, buf->bio = bio; buf->resid = bio->bi_size; buf->sector = bio->bi_sector; - buf->bv = buf->bio->bi_io_vec; + buf->bv = &bio->bi_io_vec[bio->bi_idx]; +WARN_ON (buf->bv->bv_len ==0 ); buf->bv_resid = buf->bv->bv_len; buf->bufaddr =page_address (buf->bv->bv_page) + buf->bv->bv_offset;
drivers/block/aoe/aoecmd.c +1 -0
@@ -166,6 +166,7 @@ aoecmd_ata_rw(struct aoedev *d, struct f d->inprocess =NULL ; }else if (buf->bv_resid ==0 ) { buf->bv++; +WARN_ON (buf->bv->bv_len ==0 ); buf->bv_resid = buf->bv->bv_len; buf->bufaddr =page_address (buf->bv->bv_page) + buf->bv->bv_offset; }
Signature · 1 line
"Ed L. Cashin" <[email protected]>
PATCH 1/1 aoe [12/14]: remove sysfs comment
In reply to a message not in the archiveRemove unecessary comment.
---
drivers/block/aoe/aoeblk.c +0 -1
@@ -14,7 +14,6 @@static kmem_cache_t *buf_pool_cache; -/* add attributes for our block devices in sysfs */ static ssize_t aoedisk_show_state (struct gendisk * disk,char *page) {struct aoedev *d = disk->private_data;
Signature · 1 line
"Ed L. Cashin" <[email protected]>