diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-02 11:06:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-02 11:06:02 -0500 |
commit | ec1890c5df451799dec969a3581ff72e1934b5ee (patch) | |
tree | 38e84a95297dc9c6b727b73925d5c273d110fdbe /drivers/md/multipath.c | |
parent | ca23509fbaac0ea662ab0e287bebb72f743f9e1f (diff) | |
parent | 496456c24f1f4280d50b81aa5bf439ab440b3d7e (diff) |
Merge git://brick.kernel.dk/data/git/linux-2.6-block
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 10 |
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) { |