aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index fea61e3dcd95..d56cb2ae515f 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1698,7 +1698,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1698 return 0; 1698 return 0;
1699 1699
1700 skipped: 1700 skipped:
1701 max_sector = mddev->size << 1; 1701 max_sector = mddev->dev_sectors;
1702 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) 1702 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery))
1703 max_sector = mddev->resync_max_sectors; 1703 max_sector = mddev->resync_max_sectors;
1704 if (sector_nr >= max_sector) { 1704 if (sector_nr >= max_sector) {
@@ -2079,7 +2079,7 @@ static int run(mddev_t *mddev)
2079 conf->far_offset = fo; 2079 conf->far_offset = fo;
2080 conf->chunk_mask = (sector_t)(mddev->chunk_size>>9)-1; 2080 conf->chunk_mask = (sector_t)(mddev->chunk_size>>9)-1;
2081 conf->chunk_shift = ffz(~mddev->chunk_size) - 9; 2081 conf->chunk_shift = ffz(~mddev->chunk_size) - 9;
2082 size = mddev->size >> (conf->chunk_shift-1); 2082 size = mddev->dev_sectors >> conf->chunk_shift;
2083 sector_div(size, fc); 2083 sector_div(size, fc);
2084 size = size * conf->raid_disks; 2084 size = size * conf->raid_disks;
2085 sector_div(size, nc); 2085 sector_div(size, nc);
@@ -2092,7 +2092,7 @@ static int run(mddev_t *mddev)
2092 */ 2092 */
2093 stride += conf->raid_disks - 1; 2093 stride += conf->raid_disks - 1;
2094 sector_div(stride, conf->raid_disks); 2094 sector_div(stride, conf->raid_disks);
2095 mddev->size = stride << (conf->chunk_shift-1); 2095 mddev->dev_sectors = stride << conf->chunk_shift;
2096 2096
2097 if (fo) 2097 if (fo)
2098 stride = 1; 2098 stride = 1;