diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 03a5ab705c20..b9764429d856 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -779,7 +779,7 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
779 | struct page **behind_pages = NULL; | 779 | struct page **behind_pages = NULL; |
780 | const int rw = bio_data_dir(bio); | 780 | const int rw = bio_data_dir(bio); |
781 | const int do_sync = bio_sync(bio); | 781 | const int do_sync = bio_sync(bio); |
782 | int do_barriers; | 782 | int cpu, do_barriers; |
783 | mdk_rdev_t *blocked_rdev; | 783 | mdk_rdev_t *blocked_rdev; |
784 | 784 | ||
785 | /* | 785 | /* |
@@ -804,8 +804,11 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
804 | 804 | ||
805 | bitmap = mddev->bitmap; | 805 | bitmap = mddev->bitmap; |
806 | 806 | ||
807 | disk_stat_inc(mddev->gendisk, ios[rw]); | 807 | cpu = part_stat_lock(); |
808 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); | 808 | part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); |
809 | part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], | ||
810 | bio_sectors(bio)); | ||
811 | part_stat_unlock(); | ||
809 | 812 | ||
810 | /* | 813 | /* |
811 | * make_request() can abort the operation when READA is being | 814 | * make_request() can abort the operation when READA is being |
@@ -1302,9 +1305,6 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) | |||
1302 | sbio->bi_size = r1_bio->sectors << 9; | 1305 | sbio->bi_size = r1_bio->sectors << 9; |
1303 | sbio->bi_idx = 0; | 1306 | sbio->bi_idx = 0; |
1304 | sbio->bi_phys_segments = 0; | 1307 | sbio->bi_phys_segments = 0; |
1305 | sbio->bi_hw_segments = 0; | ||
1306 | sbio->bi_hw_front_size = 0; | ||
1307 | sbio->bi_hw_back_size = 0; | ||
1308 | sbio->bi_flags &= ~(BIO_POOL_MASK - 1); | 1308 | sbio->bi_flags &= ~(BIO_POOL_MASK - 1); |
1309 | sbio->bi_flags |= 1 << BIO_UPTODATE; | 1309 | sbio->bi_flags |= 1 << BIO_UPTODATE; |
1310 | sbio->bi_next = NULL; | 1310 | sbio->bi_next = NULL; |
@@ -1790,7 +1790,6 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1790 | bio->bi_vcnt = 0; | 1790 | bio->bi_vcnt = 0; |
1791 | bio->bi_idx = 0; | 1791 | bio->bi_idx = 0; |
1792 | bio->bi_phys_segments = 0; | 1792 | bio->bi_phys_segments = 0; |
1793 | bio->bi_hw_segments = 0; | ||
1794 | bio->bi_size = 0; | 1793 | bio->bi_size = 0; |
1795 | bio->bi_end_io = NULL; | 1794 | bio->bi_end_io = NULL; |
1796 | bio->bi_private = NULL; | 1795 | bio->bi_private = NULL; |