aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.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/raid10.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/raid10.c')
-rw-r--r--drivers/md/raid10.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 57d71d5d88f4..ca313d646fd1 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -795,7 +795,6 @@ static int make_request(struct request_queue *q, struct bio * bio)
795 mirror_info_t *mirror; 795 mirror_info_t *mirror;
796 r10bio_t *r10_bio; 796 r10bio_t *r10_bio;
797 struct bio *read_bio; 797 struct bio *read_bio;
798 int cpu;
799 int i; 798 int i;
800 int chunk_sects = conf->chunk_mask + 1; 799 int chunk_sects = conf->chunk_mask + 1;
801 const int rw = bio_data_dir(bio); 800 const int rw = bio_data_dir(bio);
@@ -850,12 +849,6 @@ static int make_request(struct request_queue *q, struct bio * bio)
850 */ 849 */
851 wait_barrier(conf); 850 wait_barrier(conf);
852 851
853 cpu = part_stat_lock();
854 part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
855 part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw],
856 bio_sectors(bio));
857 part_stat_unlock();
858
859 r10_bio = mempool_alloc(conf->r10bio_pool, GFP_NOIO); 852 r10_bio = mempool_alloc(conf->r10bio_pool, GFP_NOIO);
860 853
861 r10_bio->master_bio = bio; 854 r10_bio->master_bio = bio;