md: Relax minimum size restrictions on chunk_size.
Currently, the 'chunk_size' of an array must be at-least PAGE_SIZE. This makes moving an array to a machine with a larger PAGE_SIZE, or changing the kernel to use a larger PAGE_SIZE, can stop an array from working. For RAID10 and RAID4/5/6, this is non-trivial to fix as the resync process works on whole pages at a time, and assumes them to be wholly within a stripe. For other raid personalities, this restriction is not needed at all and can be dropped. So remove the test on chunk_size from common can, and add it in just the places where it is needed: raid10 and raid4/5/6. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
@@ -4007,6 +4007,13 @@ static int run(mddev_t *mddev)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (mddev->chunk_size < PAGE_SIZE) {
|
||||
printk(KERN_ERR "md/raid5: chunk_size must be at least "
|
||||
"PAGE_SIZE but %d < %ld\n",
|
||||
mddev->chunk_size, PAGE_SIZE);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (mddev->reshape_position != MaxSector) {
|
||||
/* Check that we can continue the reshape.
|
||||
* Currently only disks can change, it must
|
||||
|
Reference in New Issue
Block a user