diff options
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index e34cd0e62473..8bdc9bfc2887 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -789,6 +789,7 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
789 | mirror_info_t *mirror; | 789 | mirror_info_t *mirror; |
790 | r10bio_t *r10_bio; | 790 | r10bio_t *r10_bio; |
791 | struct bio *read_bio; | 791 | struct bio *read_bio; |
792 | int cpu; | ||
792 | int i; | 793 | int i; |
793 | int chunk_sects = conf->chunk_mask + 1; | 794 | int chunk_sects = conf->chunk_mask + 1; |
794 | const int rw = bio_data_dir(bio); | 795 | const int rw = bio_data_dir(bio); |
@@ -816,7 +817,7 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
816 | /* This is a one page bio that upper layers | 817 | /* This is a one page bio that upper layers |
817 | * refuse to split for us, so we need to split it. | 818 | * refuse to split for us, so we need to split it. |
818 | */ | 819 | */ |
819 | bp = bio_split(bio, bio_split_pool, | 820 | bp = bio_split(bio, |
820 | chunk_sects - (bio->bi_sector & (chunk_sects - 1)) ); | 821 | chunk_sects - (bio->bi_sector & (chunk_sects - 1)) ); |
821 | if (make_request(q, &bp->bio1)) | 822 | if (make_request(q, &bp->bio1)) |
822 | generic_make_request(&bp->bio1); | 823 | generic_make_request(&bp->bio1); |
@@ -843,8 +844,11 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
843 | */ | 844 | */ |
844 | wait_barrier(conf); | 845 | wait_barrier(conf); |
845 | 846 | ||
846 | disk_stat_inc(mddev->gendisk, ios[rw]); | 847 | cpu = part_stat_lock(); |
847 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); | 848 | part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); |
849 | part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], | ||
850 | bio_sectors(bio)); | ||
851 | part_stat_unlock(); | ||
848 | 852 | ||
849 | r10_bio = mempool_alloc(conf->r10bio_pool, GFP_NOIO); | 853 | r10_bio = mempool_alloc(conf->r10bio_pool, GFP_NOIO); |
850 | 854 | ||
@@ -1345,9 +1349,6 @@ static void sync_request_write(mddev_t *mddev, r10bio_t *r10_bio) | |||
1345 | tbio->bi_size = r10_bio->sectors << 9; | 1349 | tbio->bi_size = r10_bio->sectors << 9; |
1346 | tbio->bi_idx = 0; | 1350 | tbio->bi_idx = 0; |
1347 | tbio->bi_phys_segments = 0; | 1351 | tbio->bi_phys_segments = 0; |
1348 | tbio->bi_hw_segments = 0; | ||
1349 | tbio->bi_hw_front_size = 0; | ||
1350 | tbio->bi_hw_back_size = 0; | ||
1351 | tbio->bi_flags &= ~(BIO_POOL_MASK - 1); | 1352 | tbio->bi_flags &= ~(BIO_POOL_MASK - 1); |
1352 | tbio->bi_flags |= 1 << BIO_UPTODATE; | 1353 | tbio->bi_flags |= 1 << BIO_UPTODATE; |
1353 | tbio->bi_next = NULL; | 1354 | tbio->bi_next = NULL; |
@@ -1947,7 +1948,6 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1947 | bio->bi_vcnt = 0; | 1948 | bio->bi_vcnt = 0; |
1948 | bio->bi_idx = 0; | 1949 | bio->bi_idx = 0; |
1949 | bio->bi_phys_segments = 0; | 1950 | bio->bi_phys_segments = 0; |
1950 | bio->bi_hw_segments = 0; | ||
1951 | bio->bi_size = 0; | 1951 | bio->bi_size = 0; |
1952 | } | 1952 | } |
1953 | 1953 | ||