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)
committerSong Liu <song@kernel.org>
Mon, 25 Apr 2022 21:00:37 +0000 (14:00 -0700)
commitea23994edc4169bd90d7a9b5908c6ccefd82fa40
tree85a273b1cc1b107b261e7dae56fea7eaa7948ac1
parent4631f39f058b98bfa3fd1d6ffb491fa9e70e3e81
md/raid0: Ignore RAID0 layout if the second zone has only one device

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>
drivers/md/raid0.c