Commit 1af0ea9e authored by Pascal Hambourg's avatar Pascal Hambourg Committed by Zheng Zengkai
Browse files

md/raid0: Ignore RAID0 layout if the second zone has only one device

stable inclusion
from stable-v5.10.122
commit 63bcb9da91eb0aba2e87022200f9b9aa45c4c111
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5W6OE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=63bcb9da91eb0aba2e87022200f9b9aa45c4c111



--------------------------------

commit ea23994e 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: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarPascal Hambourg <pascal@plouf.fr.eu.org>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent d3e90f4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment