diff options
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 9a5beb4fd954..06bef686f91b 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -2050,9 +2050,10 @@ static int run(mddev_t *mddev) | |||
2050 | int nc, fc, fo; | 2050 | int nc, fc, fo; |
2051 | sector_t stride, size; | 2051 | sector_t stride, size; |
2052 | 2052 | ||
2053 | if (mddev->chunk_size < PAGE_SIZE) { | 2053 | if (mddev->chunk_size < PAGE_SIZE || |
2054 | !is_power_of_2(mddev->chunk_size)) { | ||
2054 | printk(KERN_ERR "md/raid10: chunk size must be " | 2055 | printk(KERN_ERR "md/raid10: chunk size must be " |
2055 | "at least PAGE_SIZE(%ld).\n", PAGE_SIZE); | 2056 | "at least PAGE_SIZE(%ld) and be a power of 2.\n", PAGE_SIZE); |
2056 | return -EINVAL; | 2057 | return -EINVAL; |
2057 | } | 2058 | } |
2058 | 2059 | ||