diff options
author | NeilBrown <neilb@suse.de> | 2010-03-25 06:20:56 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-05-18 07:27:52 +0200 |
commit | 490773268cf64f68da2470e07b52c7944da6312d (patch) | |
tree | d394aafa7203c316db6b63f128b8894e18993fca /drivers/md/raid5.c | |
parent | md/raid5: small tidyup in raid5_align_endio (diff) | |
download | linux-490773268cf64f68da2470e07b52c7944da6312d.tar.xz linux-490773268cf64f68da2470e07b52c7944da6312d.zip |
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) sector_t logical_sector, last_sector; struct stripe_head *sh; const int rw = bio_data_dir(bi); - int cpu, remaining; + int remaining; if (unlikely(bio_rw_flagged(bi, BIO_RW_BARRIER))) { /* Drain all pending writes. We only really need @@ -3894,12 +3894,6 @@ static int make_request(struct request_queue *q, struct bio * bi) md_write_start(mddev, bi); - cpu = part_stat_lock(); - part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); - part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], - bio_sectors(bi)); - part_stat_unlock(); - if (rw == READ && mddev->reshape_position == MaxSector && chunk_aligned_read(q,bi)) |