diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index f6757259ce7f..fece3277c2a5 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -403,19 +403,15 @@ static int raid0_make_request (request_queue_t *q, struct bio *bio) | |||
403 | mdk_rdev_t *tmp_dev; | 403 | mdk_rdev_t *tmp_dev; |
404 | unsigned long chunk; | 404 | unsigned long chunk; |
405 | sector_t block, rsect; | 405 | sector_t block, rsect; |
406 | const int rw = bio_data_dir(bio); | ||
406 | 407 | ||
407 | if (unlikely(bio_barrier(bio))) { | 408 | if (unlikely(bio_barrier(bio))) { |
408 | bio_endio(bio, bio->bi_size, -EOPNOTSUPP); | 409 | bio_endio(bio, bio->bi_size, -EOPNOTSUPP); |
409 | return 0; | 410 | return 0; |
410 | } | 411 | } |
411 | 412 | ||
412 | if (bio_data_dir(bio)==WRITE) { | 413 | disk_stat_inc(mddev->gendisk, ios[rw]); |
413 | disk_stat_inc(mddev->gendisk, writes); | 414 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); |
414 | disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bio)); | ||
415 | } else { | ||
416 | disk_stat_inc(mddev->gendisk, reads); | ||
417 | disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bio)); | ||
418 | } | ||
419 | 415 | ||
420 | chunk_size = mddev->chunk_size >> 10; | 416 | chunk_size = mddev->chunk_size >> 10; |
421 | chunk_sects = mddev->chunk_size >> 9; | 417 | chunk_sects = mddev->chunk_size >> 9; |