Accepting request 582467 from Base:System

mdadm: allow clustered raid10 to be created with default layout (forwarded request 582461 from gqjiang)

OBS-URL: https://build.opensuse.org/request/show/582467
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mdadm?expand=0&rev=115
This commit is contained in:
Dominique Leuenberger 2018-03-07 09:30:13 +00:00 committed by Git OBS Bridge
commit f48ab2f66a
3 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 18160d345536b88419785c5e408cce402d9db2ae Mon Sep 17 00:00:00 2001
From: Guoqing Jiang <gqjiang@suse.com>
Date: Wed, 3 Jan 2018 15:01:22 +0800
Subject: [PATCH] mdadm: allow clustered raid10 to be created with default
layout
Git-commit: 18160d345536b88419785c5e408cce402d9db2ae
Patch-mainline: mdadm-4.0+
References: bsc#1083881
Since the default layout of raid10 is n2, so we
should allow the behavior.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
mdadm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mdadm.c b/mdadm.c
index 62d7ec34a17f..afc3015144d3 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1547,7 +1547,7 @@ int main(int argc, char *argv[])
rv = 1;
break;
}
- if (s.level == 10 && !is_near_layout_10(s.layout)) {
+ if (s.level == 10 && !(is_near_layout_10(s.layout) || s.layout == UnSet)) {
pr_err("only near layout is supported with clustered raid10\n");
rv = 1;
break;
--
2.10.0

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Mar 5 03:25:18 UTC 2018 - gqjiang@suse.com
- mdadm: allow clustered raid10 to be created with default layout
(bsc#1083881)
0210-mdadm-allow-clustered-raid10-to-be-created-with-defa.patch
-------------------------------------------------------------------
Sat Feb 10 14:34:01 UTC 2018 - colyli@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package mdadm
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -252,6 +252,7 @@ Patch206: 0206-imsm-continue-resync-on-3-disk-RAID10.patch
Patch207: 0207-managemon-Don-t-add-disk-to-the-array-after-it-has-s.patch
Patch208: 0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch
Patch209: 0209-policy.c-Avoid-to-take-spare-without-defined-domain-.patch
Patch210: 0210-mdadm-allow-clustered-raid10-to-be-created-with-defa.patch
%define _udevdir %(pkg-config --variable=udevdir udev)
%define _systemdshutdowndir %{_unitdir}/../system-shutdown
@ -471,6 +472,7 @@ programs but with a very different interface.
%patch207 -p1
%patch208 -p1
%patch209 -p1
%patch210 -p1
%build
make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes