diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-08-01 01:34:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-01 22:14:01 -0400 |
commit | b1581566183f310abbd2d384a9079d4039faca05 (patch) | |
tree | 41c7ba3538663a6c79ad5ac9b002f4bd54d4a4f4 /drivers/md/raid5.c | |
parent | 57ee67af35183c60e924ebb6d6b3e1d2d9c03366 (diff) |
[PATCH] md: make sure raid5/raid6 resync uses correct 'max_sectors'
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>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 4698d5f79575..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", |