md/raid0: Ignore RAID0 layout if the second zone has only one device
authorPascal Hambourg <pascal@plouf.fr.eu.org>
Wed, 13 Apr 2022 06:53:56 +0000 (08:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:54:02 +0000 (16:54 +0200)
commitc2e6681944db4ee641354f22a67b131969a055bc
treec94e0b40bd6d52bdf1ccf088862fc533c6c8a110
parentd13c94c4b6f816e79b8e4df193db1bdcc7253610
md/raid0: Ignore RAID0 layout if the second zone has only one device

commit ea23994edc4169bd90d7a9b5908c6ccefd82fa40 upstream.

The RAID0 layout is irrelevant if all members have the same size so the
array has only one zone. It is *also* irrelevant if the array has two
zones and the second zone has only one device, for example if the array
has two members of different sizes.

So in that case it makes sense to allow assembly even when the layout is
undefined, like what is done when the array has only one zone.

Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Pascal Hambourg <pascal@plouf.fr.eu.org>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid0.c