aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoecmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r--drivers/block/aoe/aoecmd.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 5c9c7c1a3d4c..326ca3876b68 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -468,16 +468,11 @@ aoecmd_ata_rsp(struct sk_buff *skb)
468 unsigned long duration = jiffies - buf->start_time; 468 unsigned long duration = jiffies - buf->start_time;
469 unsigned long n_sect = buf->bio->bi_size >> 9; 469 unsigned long n_sect = buf->bio->bi_size >> 9;
470 struct gendisk *disk = d->gd; 470 struct gendisk *disk = d->gd;
471 const int rw = bio_data_dir(buf->bio);
471 472
472 if (bio_data_dir(buf->bio) == WRITE) { 473 disk_stat_inc(disk, ios[rw]);
473 disk_stat_inc(disk, writes); 474 disk_stat_add(disk, ticks[rw], duration);
474 disk_stat_add(disk, write_ticks, duration); 475 disk_stat_add(disk, sectors[rw], n_sect);
475 disk_stat_add(disk, write_sectors, n_sect);
476 } else {
477 disk_stat_inc(disk, reads);
478 disk_stat_add(disk, read_ticks, duration);
479 disk_stat_add(disk, read_sectors, n_sect);
480 }
481 disk_stat_add(disk, io_ticks, duration); 476 disk_stat_add(disk, io_ticks, duration);
482 n = (buf->flags & BUFFL_FAIL) ? -EIO : 0; 477 n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
483 bio_endio(buf->bio, buf->bio->bi_size, n); 478 bio_endio(buf->bio, buf->bio->bi_size, n);