]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] md: make sure raid5/raid6 resync uses correct 'max_sectors'
authorNeilBrown <neilb@cse.unsw.edu.au>
Mon, 1 Aug 2005 05:34:50 +0000 (22:34 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 2 Aug 2005 02:14:01 +0000 (19:14 -0700)
The default resync_max_sector is set to "mddev->size << 1".  If the
raid-personality-module updates mddev->size, it must update
resync_max_sectors too.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid5.c
drivers/md/raid6main.c

index 4698d5f79575dd00a4bd03c355e86881654d0654..43f231a467d5cb0137f15bd5568de80993a0bb08 100644 (file)
@@ -1653,6 +1653,7 @@ static int run (mddev_t *mddev)
 
        /* device size must be a multiple of chunk size */
        mddev->size &= ~(mddev->chunk_size/1024 -1);
+       mddev->resync_max_sectors = mddev->size << 1;
 
        if (!conf->chunk_size || conf->chunk_size % 4) {
                printk(KERN_ERR "raid5: invalid chunk size %d for %s\n",
index f5ee16805111b9eea157c72f2a2e5b20c9ea2f47..495dee1d1e8335bcef634be427e0132bb596413e 100644 (file)
@@ -1813,6 +1813,7 @@ static int run (mddev_t *mddev)
 
        /* device size must be a multiple of chunk size */
        mddev->size &= ~(mddev->chunk_size/1024 -1);
+       mddev->resync_max_sectors = mddev->size << 1;
 
        if (conf->raid_disks < 4) {
                printk(KERN_ERR "raid6: not enough configured devices for %s (%d, minimum 4)\n",