]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm: allow clustered raid10 to be created with default layout
authorGuoqing Jiang <gqjiang@suse.com>
Wed, 3 Jan 2018 07:01:22 +0000 (15:01 +0800)
committerJes Sorensen <jsorensen@fb.com>
Sun, 21 Jan 2018 20:56:27 +0000 (15:56 -0500)
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

diff --git a/mdadm.c b/mdadm.c
index 62d7ec34a17f5161c348fb16dd9a7de37141acc6..afc3015144d3f581dc1024405296c0747c34e7f0 100644 (file)
--- 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;