diff options
Diffstat (limited to 'drivers/block/rsxx')
-rw-r--r-- | drivers/block/rsxx/dev.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index 40ee7705df63..ac8c62cb4875 100644 --- a/drivers/block/rsxx/dev.c +++ b/drivers/block/rsxx/dev.c | |||
@@ -112,37 +112,16 @@ static const struct block_device_operations rsxx_fops = { | |||
112 | 112 | ||
113 | static void disk_stats_start(struct rsxx_cardinfo *card, struct bio *bio) | 113 | static void disk_stats_start(struct rsxx_cardinfo *card, struct bio *bio) |
114 | { | 114 | { |
115 | struct hd_struct *part0 = &card->gendisk->part0; | 115 | generic_start_io_acct(bio_data_dir(bio), bio_sectors(bio), |
116 | int rw = bio_data_dir(bio); | 116 | &card->gendisk->part0); |
117 | int cpu; | ||
118 | |||
119 | cpu = part_stat_lock(); | ||
120 | |||
121 | part_round_stats(cpu, part0); | ||
122 | part_inc_in_flight(part0, rw); | ||
123 | |||
124 | part_stat_unlock(); | ||
125 | } | 117 | } |
126 | 118 | ||
127 | static void disk_stats_complete(struct rsxx_cardinfo *card, | 119 | static void disk_stats_complete(struct rsxx_cardinfo *card, |
128 | struct bio *bio, | 120 | struct bio *bio, |
129 | unsigned long start_time) | 121 | unsigned long start_time) |
130 | { | 122 | { |
131 | struct hd_struct *part0 = &card->gendisk->part0; | 123 | generic_end_io_acct(bio_data_dir(bio), &card->gendisk->part0, |
132 | unsigned long duration = jiffies - start_time; | 124 | start_time); |
133 | int rw = bio_data_dir(bio); | ||
134 | int cpu; | ||
135 | |||
136 | cpu = part_stat_lock(); | ||
137 | |||
138 | part_stat_add(cpu, part0, sectors[rw], bio_sectors(bio)); | ||
139 | part_stat_inc(cpu, part0, ios[rw]); | ||
140 | part_stat_add(cpu, part0, ticks[rw], duration); | ||
141 | |||
142 | part_round_stats(cpu, part0); | ||
143 | part_dec_in_flight(part0, rw); | ||
144 | |||
145 | part_stat_unlock(); | ||
146 | } | 125 | } |
147 | 126 | ||
148 | static void bio_dma_done_cb(struct rsxx_cardinfo *card, | 127 | static void bio_dma_done_cb(struct rsxx_cardinfo *card, |