aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 93a9726cc2d6..43f231a467d5 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1653,6 +1653,7 @@ static int run (mddev_t *mddev)
1653 1653
1654 /* device size must be a multiple of chunk size */ 1654 /* device size must be a multiple of chunk size */
1655 mddev->size &= ~(mddev->chunk_size/1024 -1); 1655 mddev->size &= ~(mddev->chunk_size/1024 -1);
1656 mddev->resync_max_sectors = mddev->size << 1;
1656 1657
1657 if (!conf->chunk_size || conf->chunk_size % 4) { 1658 if (!conf->chunk_size || conf->chunk_size % 4) {
1658 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n", 1659 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n",
@@ -1931,6 +1932,7 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors)
1931 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 1932 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
1932 } 1933 }
1933 mddev->size = sectors /2; 1934 mddev->size = sectors /2;
1935 mddev->resync_max_sectors = sectors;
1934 return 0; 1936 return 0;
1935} 1937}
1936 1938