aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-03-25 01:20:56 -0400
committerNeilBrown <neilb@suse.de>2010-05-18 01:27:52 -0400
commit490773268cf64f68da2470e07b52c7944da6312d (patch)
treed394aafa7203c316db6b63f128b8894e18993fca /drivers/md/raid0.c
parent2b7f22284d71975e37a82db154386348eec0e52c (diff)
md: move io accounting out of personalities into md_make_request
While I generally prefer letting personalities do as much as possible, given that we have a central md_make_request anyway we may as well use it to simplify code. Also this centralises knowledge of ->gendisk which will help later. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index afddf624bad3..d535f9be39f4 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -472,20 +472,12 @@ static int raid0_make_request(struct request_queue *q, struct bio *bio)
472 sector_t sector_offset; 472 sector_t sector_offset;
473 struct strip_zone *zone; 473 struct strip_zone *zone;
474 mdk_rdev_t *tmp_dev; 474 mdk_rdev_t *tmp_dev;
475 const int rw = bio_data_dir(bio);
476 int cpu;
477 475
478 if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) { 476 if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) {
479 md_barrier_request(mddev, bio); 477 md_barrier_request(mddev, bio);
480 return 0; 478 return 0;
481 } 479 }
482 480
483 cpu = part_stat_lock();
484 part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
485 part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw],
486 bio_sectors(bio));
487 part_stat_unlock();
488
489 chunk_sects = mddev->chunk_sectors; 481 chunk_sects = mddev->chunk_sectors;
490 if (unlikely(!is_io_in_chunk_boundary(mddev, chunk_sects, bio))) { 482 if (unlikely(!is_io_in_chunk_boundary(mddev, chunk_sects, bio))) {
491 sector_t sector = bio->bi_sector; 483 sector_t sector = bio->bi_sector;