mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 15:40:50 +00:00
[BLOCK] aoe: update for combined io statistics
Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
a362357b6c
commit
496456c24f
@ -468,16 +468,11 @@ aoecmd_ata_rsp(struct sk_buff *skb)
|
|||||||
unsigned long duration = jiffies - buf->start_time;
|
unsigned long duration = jiffies - buf->start_time;
|
||||||
unsigned long n_sect = buf->bio->bi_size >> 9;
|
unsigned long n_sect = buf->bio->bi_size >> 9;
|
||||||
struct gendisk *disk = d->gd;
|
struct gendisk *disk = d->gd;
|
||||||
|
const int rw = bio_data_dir(buf->bio);
|
||||||
|
|
||||||
if (bio_data_dir(buf->bio) == WRITE) {
|
disk_stat_inc(disk, ios[rw]);
|
||||||
disk_stat_inc(disk, writes);
|
disk_stat_add(disk, ticks[rw], duration);
|
||||||
disk_stat_add(disk, write_ticks, duration);
|
disk_stat_add(disk, sectors[rw], n_sect);
|
||||||
disk_stat_add(disk, write_sectors, n_sect);
|
|
||||||
} else {
|
|
||||||
disk_stat_inc(disk, reads);
|
|
||||||
disk_stat_add(disk, read_ticks, duration);
|
|
||||||
disk_stat_add(disk, read_sectors, n_sect);
|
|
||||||
}
|
|
||||||
disk_stat_add(disk, io_ticks, duration);
|
disk_stat_add(disk, io_ticks, duration);
|
||||||
n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
|
n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
|
||||||
bio_endio(buf->bio, buf->bio->bi_size, n);
|
bio_endio(buf->bio, buf->bio->bi_size, n);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user