aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/multipath.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-02 08:06:02 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-02 08:06:02 -0800
commitec1890c5df451799dec969a3581ff72e1934b5ee (patch)
tree38e84a95297dc9c6b727b73925d5c273d110fdbe /drivers/md/multipath.c
parentca23509fbaac0ea662ab0e287bebb72f743f9e1f (diff)
parent496456c24f1f4280d50b81aa5bf439ab440b3d7e (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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 1151c3ed300..c06f4474192 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)
multipath_conf_t *conf = mddev_to_conf(mddev);
struct multipath_bh * mp_bh;
struct multipath_info *multipath;
+ const int rw = bio_data_dir(bio);
if (unlikely(bio_barrier(bio))) {
bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
@@ -179,13 +180,8 @@ static int multipath_make_request (request_queue_t *q, struct bio * bio)
mp_bh->master_bio = bio;
mp_bh->mddev = mddev;
- if (bio_data_dir(bio)==WRITE) {
- disk_stat_inc(mddev->gendisk, writes);
- disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bio));
- } else {
- disk_stat_inc(mddev->gendisk, reads);
- disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bio));
- }
+ disk_stat_inc(mddev->gendisk, ios[rw]);
+ disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio));
mp_bh->path = multipath_map(conf);
if (mp_bh->path < 0) {