aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/multipath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r--drivers/md/multipath.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 1151c3ed3006..c06f4474192b 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -168,6 +168,7 @@ static int multipath_make_request (request_queue_t *q, struct bio * bio)
168 multipath_conf_t *conf = mddev_to_conf(mddev); 168 multipath_conf_t *conf = mddev_to_conf(mddev);
169 struct multipath_bh * mp_bh; 169 struct multipath_bh * mp_bh;
170 struct multipath_info *multipath; 170 struct multipath_info *multipath;
171 const int rw = bio_data_dir(bio);
171 172
172 if (unlikely(bio_barrier(bio))) { 173 if (unlikely(bio_barrier(bio))) {
173 bio_endio(bio, bio->bi_size, -EOPNOTSUPP); 174 bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
@@ -179,13 +180,8 @@ static int multipath_make_request (request_queue_t *q, struct bio * bio)
179 mp_bh->master_bio = bio; 180 mp_bh->master_bio = bio;
180 mp_bh->mddev = mddev; 181 mp_bh->mddev = mddev;
181 182
182 if (bio_data_dir(bio)==WRITE) { 183 disk_stat_inc(mddev->gendisk, ios[rw]);
183 disk_stat_inc(mddev->gendisk, writes); 184 disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio));
184 disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bio));
185 } else {
186 disk_stat_inc(mddev->gendisk, reads);
187 disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bio));
188 }
189 185
190 mp_bh->path = multipath_map(conf); 186 mp_bh->path = multipath_map(conf);
191 if (mp_bh->path < 0) { 187 if (mp_bh->path < 0) {