diff options
author | NeilBrown <neilb@suse.de> | 2010-03-25 01:20:56 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-05-18 01:27:52 -0400 |
commit | 490773268cf64f68da2470e07b52c7944da6312d (patch) | |
tree | d394aafa7203c316db6b63f128b8894e18993fca /drivers/md/raid5.c | |
parent | 2b7f22284d71975e37a82db154386348eec0e52c (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/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 7bfeba3ce1e0..c6ae7c194915 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -3879,7 +3879,7 @@ static int make_request(struct request_queue *q, struct bio * bi) | |||
3879 | sector_t logical_sector, last_sector; | 3879 | sector_t logical_sector, last_sector; |
3880 | struct stripe_head *sh; | 3880 | struct stripe_head *sh; |
3881 | const int rw = bio_data_dir(bi); | 3881 | const int rw = bio_data_dir(bi); |
3882 | int cpu, remaining; | 3882 | int remaining; |
3883 | 3883 | ||
3884 | if (unlikely(bio_rw_flagged(bi, BIO_RW_BARRIER))) { | 3884 | if (unlikely(bio_rw_flagged(bi, BIO_RW_BARRIER))) { |
3885 | /* Drain all pending writes. We only really need | 3885 | /* Drain all pending writes. We only really need |
@@ -3894,12 +3894,6 @@ static int make_request(struct request_queue *q, struct bio * bi) | |||
3894 | 3894 | ||
3895 | md_write_start(mddev, bi); | 3895 | md_write_start(mddev, bi); |
3896 | 3896 | ||
3897 | cpu = part_stat_lock(); | ||
3898 | part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); | ||
3899 | part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], | ||
3900 | bio_sectors(bi)); | ||
3901 | part_stat_unlock(); | ||
3902 | |||
3903 | if (rw == READ && | 3897 | if (rw == READ && |
3904 | mddev->reshape_position == MaxSector && | 3898 | mddev->reshape_position == MaxSector && |
3905 | chunk_aligned_read(q,bi)) | 3899 | chunk_aligned_read(q,bi)) |