diff options
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 84c03d65dcc5..17eed8c025d0 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -756,16 +756,17 @@ diskstats(struct gendisk *disk, struct bio *bio, ulong duration, sector_t sector | |||
756 | unsigned long n_sect = bio->bi_size >> 9; | 756 | unsigned long n_sect = bio->bi_size >> 9; |
757 | const int rw = bio_data_dir(bio); | 757 | const int rw = bio_data_dir(bio); |
758 | struct hd_struct *part; | 758 | struct hd_struct *part; |
759 | int cpu; | ||
759 | 760 | ||
760 | rcu_read_lock(); | 761 | cpu = disk_stat_lock(); |
761 | |||
762 | part = disk_map_sector_rcu(disk, sector); | 762 | part = disk_map_sector_rcu(disk, sector); |
763 | all_stat_inc(disk, part, ios[rw], sector); | ||
764 | all_stat_add(disk, part, ticks[rw], duration, sector); | ||
765 | all_stat_add(disk, part, sectors[rw], n_sect, sector); | ||
766 | all_stat_add(disk, part, io_ticks, duration, sector); | ||
767 | 763 | ||
768 | rcu_read_unlock(); | 764 | all_stat_inc(cpu, disk, part, ios[rw], sector); |
765 | all_stat_add(cpu, disk, part, ticks[rw], duration, sector); | ||
766 | all_stat_add(cpu, disk, part, sectors[rw], n_sect, sector); | ||
767 | all_stat_add(cpu, disk, part, io_ticks, duration, sector); | ||
768 | |||
769 | disk_stat_unlock(); | ||
769 | } | 770 | } |
770 | 771 | ||
771 | void | 772 | void |