diff options
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index bb279fad2fd2..946efef3a8f5 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -271,6 +271,7 @@ static int linear_stop (mddev_t *mddev) | |||
271 | 271 | ||
272 | static int linear_make_request (request_queue_t *q, struct bio *bio) | 272 | static int linear_make_request (request_queue_t *q, struct bio *bio) |
273 | { | 273 | { |
274 | const int rw = bio_data_dir(bio); | ||
274 | mddev_t *mddev = q->queuedata; | 275 | mddev_t *mddev = q->queuedata; |
275 | dev_info_t *tmp_dev; | 276 | dev_info_t *tmp_dev; |
276 | sector_t block; | 277 | sector_t block; |
@@ -280,13 +281,8 @@ static int linear_make_request (request_queue_t *q, struct bio *bio) | |||
280 | return 0; | 281 | return 0; |
281 | } | 282 | } |
282 | 283 | ||
283 | if (bio_data_dir(bio)==WRITE) { | 284 | disk_stat_inc(mddev->gendisk, ios[rw]); |
284 | disk_stat_inc(mddev->gendisk, writes); | 285 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); |
285 | disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bio)); | ||
286 | } else { | ||
287 | disk_stat_inc(mddev->gendisk, reads); | ||
288 | disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bio)); | ||
289 | } | ||
290 | 286 | ||
291 | tmp_dev = which_dev(mddev, bio->bi_sector); | 287 | tmp_dev = which_dev(mddev, bio->bi_sector); |
292 | block = bio->bi_sector >> 1; | 288 | block = bio->bi_sector >> 1; |