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/multipath.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/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 97befd5cc0e3..5b4e2918663a 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -141,8 +141,6 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio) | |||
141 | multipath_conf_t *conf = mddev->private; | 141 | multipath_conf_t *conf = mddev->private; |
142 | struct multipath_bh * mp_bh; | 142 | struct multipath_bh * mp_bh; |
143 | struct multipath_info *multipath; | 143 | struct multipath_info *multipath; |
144 | const int rw = bio_data_dir(bio); | ||
145 | int cpu; | ||
146 | 144 | ||
147 | if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) { | 145 | if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) { |
148 | md_barrier_request(mddev, bio); | 146 | md_barrier_request(mddev, bio); |
@@ -154,12 +152,6 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio) | |||
154 | mp_bh->master_bio = bio; | 152 | mp_bh->master_bio = bio; |
155 | mp_bh->mddev = mddev; | 153 | mp_bh->mddev = mddev; |
156 | 154 | ||
157 | cpu = part_stat_lock(); | ||
158 | part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); | ||
159 | part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], | ||
160 | bio_sectors(bio)); | ||
161 | part_stat_unlock(); | ||
162 | |||
163 | mp_bh->path = multipath_map(conf); | 155 | mp_bh->path = multipath_map(conf); |
164 | if (mp_bh->path < 0) { | 156 | if (mp_bh->path < 0) { |
165 | bio_endio(bio, -EIO); | 157 | bio_endio(bio, -EIO); |