summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-05 20:38:55 +0100
committerJeff Garzik <jgarzik@pobox.com>2005-11-05 20:38:55 +0100
commit328198acb7407301ddf6005c0fa1e04bd0c539c8 (patch)
tree9936112bd195bfbaacc9a75f2ea7ff757a2c0546 /drivers/md/raid0.c
parentMerge branch 'master' (diff)
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 (diff)
downloadlinux-328198acb7407301ddf6005c0fa1e04bd0c539c8.tar.xz
linux-328198acb7407301ddf6005c0fa1e04bd0c539c8.zip
Merge branch 'master'
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index f6757259ce7f..fece3277c2a5 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -403,19 +403,15 @@ static int raid0_make_request (request_queue_t *q, struct bio *bio)
mdk_rdev_t *tmp_dev;
unsigned long chunk;
sector_t block, rsect;
+ const int rw = bio_data_dir(bio);
if (unlikely(bio_barrier(bio))) {
bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
return 0;
}
- 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));
chunk_size = mddev->chunk_size >> 10;
chunk_sects = mddev->chunk_size >> 9;