From: NeilBrown Subject: Don't fail to start a RAID1 with a small chunksize Patch-mainline: no References: 459557 For a RAID1 array, chunksize is almost meaningless (it is used to round down the device size to a multiple of chunksize, but that is largely of historical interest). However it is possible to set the chunksize, and it is possible to set it to be less than PAGE_SIZE. This currently causes the array to fail to start. However there is no good reason for that. And YaST seems to create RAID1 arrays with a 4K chunks which breaks on PPC-64 machines with 64K pages. So ignore the "chunk_size < PAGE_SIZE" check on RAID1 like we do for RAID0 Signed-off-by: Neil Brown --- drivers/md/md.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3587,13 +3587,13 @@ static int do_md_run(mddev_t * mddev) return -EINVAL; } if (chunk_size < PAGE_SIZE) { - if (mddev->level) { + if (mddev->level != 0 && mddev->level != 1) { printk(KERN_ERR "too small chunk_size: %d < %ld\n", chunk_size, PAGE_SIZE); return -EINVAL; } else { - printk(KERN_ERR "too small chunk_size: %d < %ld, but continuing anyway on raid0. Good luck!\n", - chunk_size, PAGE_SIZE); + printk(KERN_ERR "too small chunk_size: %d < %ld, but continuing anyway on raid%d. Good luck!\n", + chunk_size, PAGE_SIZE, mddev->level); } }