mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 10:56:40 +00:00
md: raid5: chunk size check in setup_conf
have raid5 check chunk size in run/reshape method instead of in md Signed-off-by: raziebe@gmail.com Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
964e7913b0
commit
740da44918
@ -4336,7 +4336,8 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
if (!mddev->new_chunk || mddev->new_chunk % PAGE_SIZE) {
|
||||
if (!mddev->new_chunk || mddev->new_chunk % PAGE_SIZE ||
|
||||
!is_power_of_2(mddev->new_chunk)) {
|
||||
printk(KERN_ERR "raid5: invalid chunk size %d for %s\n",
|
||||
mddev->new_chunk, mdname(mddev));
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user