aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-05-20 19:28:32 -0400
committerNeilBrown <neilb@suse.de>2012-05-20 19:28:32 -0400
commit1fdd6fc92f330b81604c9a4f892f713775a9751a (patch)
treefb0249d6891e04cfe7c82e850d86361879fec377 /drivers/md/md.c
parent5cf00fcd3c98d2eafb58ac7a649bbdb9dbc4902b (diff)
md: teach sync_page_io about new_data_offset.
Some code in raid1 and raid10 use sync_page_io to read/write pages when responding to read errors. As we will shortly support changing data_offset for raid10, this function must understand new_data_offset. So add that understanding. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9fa98fc74b05..c6b8d9fd0b04 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -888,6 +888,10 @@ int sync_page_io(struct md_rdev *rdev, sector_t sector, int size,
888 rdev->meta_bdev : rdev->bdev; 888 rdev->meta_bdev : rdev->bdev;
889 if (metadata_op) 889 if (metadata_op)
890 bio->bi_sector = sector + rdev->sb_start; 890 bio->bi_sector = sector + rdev->sb_start;
891 else if (rdev->mddev->reshape_position != MaxSector &&
892 (rdev->mddev->reshape_backwards ==
893 (sector >= rdev->mddev->reshape_position)))
894 bio->bi_sector = sector + rdev->new_data_offset;
891 else 895 else
892 bio->bi_sector = sector + rdev->data_offset; 896 bio->bi_sector = sector + rdev->data_offset;
893 bio_add_page(bio, page, size, 0); 897 bio_add_page(bio, page, size, 0);