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 16:36:28 +0000 (18:36 +0200)
commit4c106eb8953456a2768d4e5f78888c3209f9a046
treedff82c50b375938c78efb8b17200ef7bf9df6994
parent51e5572724826d433d74c40702fa762342a3406c
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