diff options
author | raz ben yehuda <raziebe@gmail.com> | 2009-06-16 17:01:36 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-16 17:01:36 +1000 |
commit | 740da44918680a0c72411ae4ccdd1861069afcc4 (patch) | |
tree | 2d68483563ee16198af3418c40352c34828cc01f /drivers/md | |
parent | 964e7913b0d25b988e27a7cd9378bc55cc572bb4 (diff) | |
download | blackbird-op-linux-740da44918680a0c72411ae4ccdd1861069afcc4.tar.gz blackbird-op-linux-740da44918680a0c72411ae4ccdd1861069afcc4.zip |
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>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 7fb97c65ad37..be4e62f611bc 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -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); |