public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 3/8] Enhanced partition statistics: aoe fix
@ 2007-12-13 16:17 Jerome Marchand
  2007-12-13 20:08 ` Ed L. Cashin
  0 siblings, 1 reply; 2+ messages in thread
From: Jerome Marchand @ 2007-12-13 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: axboe, ecashin

Updates the enhanced partition statistics in ATA over Ethernet driver (not tested).

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
---
 aoecmd.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6.orig/drivers/block/aoe/aoecmd.c linux-2.6/drivers/block/aoe/aoecmd.c
--- linux-2.6.orig/drivers/block/aoe/aoecmd.c	2007-12-04 17:37:13.000000000 +0100
+++ linux-2.6/drivers/block/aoe/aoecmd.c	2007-12-05 13:45:10.000000000 +0100
@@ -648,10 +648,10 @@ aoecmd_ata_rsp(struct sk_buff *skb)
 			struct gendisk *disk = d->gd;
 			const int rw = bio_data_dir(buf->bio);
 
-			disk_stat_inc(disk, ios[rw]);
-			disk_stat_add(disk, ticks[rw], duration);
-			disk_stat_add(disk, sectors[rw], n_sect);
-			disk_stat_add(disk, io_ticks, duration);
+			all_stat_inc(disk, ios[rw], buf->sector);
+			all_stat_add(disk, ticks[rw], duration, buf->sector);
+			all_stat_add(disk, sectors[rw], n_sect, buf->sector);
+			all_stat_add(disk, io_ticks, duration, buf->sector);
 			n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
 			bio_endio(buf->bio, n);
 			mempool_free(buf, d->bufpool);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch 3/8] Enhanced partition statistics: aoe fix
  2007-12-13 16:17 [Patch 3/8] Enhanced partition statistics: aoe fix Jerome Marchand
@ 2007-12-13 20:08 ` Ed L. Cashin
  0 siblings, 0 replies; 2+ messages in thread
From: Ed L. Cashin @ 2007-12-13 20:08 UTC (permalink / raw)
  To: Jerome Marchand; +Cc: linux-kernel, axboe

On Thu, Dec 13, 2007 at 05:17:45PM +0100, Jerome Marchand wrote:
> Updates the enhanced partition statistics in ATA over Ethernet driver (not tested).

Acked-by: Ed L. Cashin <ecashin@coraid.com>

> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
> ---
>  aoecmd.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> diff -urNp -X linux-2.6/Documentation/dontdiff linux-2.6.orig/drivers/block/aoe/aoecmd.c linux-2.6/drivers/block/aoe/aoecmd.c
> --- linux-2.6.orig/drivers/block/aoe/aoecmd.c	2007-12-04 17:37:13.000000000 +0100
> +++ linux-2.6/drivers/block/aoe/aoecmd.c	2007-12-05 13:45:10.000000000 +0100
> @@ -648,10 +648,10 @@ aoecmd_ata_rsp(struct sk_buff *skb)
>  			struct gendisk *disk = d->gd;
>  			const int rw = bio_data_dir(buf->bio);
>  
> -			disk_stat_inc(disk, ios[rw]);
> -			disk_stat_add(disk, ticks[rw], duration);
> -			disk_stat_add(disk, sectors[rw], n_sect);
> -			disk_stat_add(disk, io_ticks, duration);
> +			all_stat_inc(disk, ios[rw], buf->sector);
> +			all_stat_add(disk, ticks[rw], duration, buf->sector);
> +			all_stat_add(disk, sectors[rw], n_sect, buf->sector);
> +			all_stat_add(disk, io_ticks, duration, buf->sector);
>  			n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
>  			bio_endio(buf->bio, n);
>  			mempool_free(buf, d->bufpool);

-- 
  Ed L Cashin <ecashin@coraid.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-13 20:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 16:17 [Patch 3/8] Enhanced partition statistics: aoe fix Jerome Marchand
2007-12-13 20:08 ` Ed L. Cashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox