aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorraz ben yehuda <raziebe@gmail.com>2009-06-16 03:01:36 -0400
committerNeilBrown <neilb@suse.de>2009-06-16 03:01:36 -0400
commit740da44918680a0c72411ae4ccdd1861069afcc4 (patch)
tree2d68483563ee16198af3418c40352c34828cc01f /drivers
parent964e7913b0d25b988e27a7cd9378bc55cc572bb4 (diff)
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')
-rw-r--r--drivers/md/raid5.c3
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)
4336 return ERR_PTR(-EINVAL); 4336 return ERR_PTR(-EINVAL);
4337 } 4337 }
4338 4338
4339 if (!mddev->new_chunk || mddev->new_chunk % PAGE_SIZE) { 4339 if (!mddev->new_chunk || mddev->new_chunk % PAGE_SIZE ||
4340 !is_power_of_2(mddev->new_chunk)) {
4340 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n", 4341 printk(KERN_ERR "raid5: invalid chunk size %d for %s\n",
4341 mddev->new_chunk, mdname(mddev)); 4342 mddev->new_chunk, mdname(mddev));
4342 return ERR_PTR(-EINVAL); 4343 return ERR_PTR(-EINVAL);