summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2019-11-04 14:27:49 +1100
committerJes Sorensen <jsorensen@fb.com>2019-12-02 16:14:49 -0500
commit329dfc28debb58ffe7bd1967cea00fc583139aca (patch)
tree91b570ff204f3356a2617b5cbaecee133627d74f /Detail.c
parent6da53c0e2aab200605722795798b1e4f2352cd64 (diff)
downloadmdadm-329dfc28debb58ffe7bd1967cea00fc583139aca.tar.gz
Create: add support for RAID0 layouts.
Since Linux 5.4 a layout is needed for RAID0 arrays with varying device sizes. This patch makes the layout of an array visible (via --examine) and sets the layout on newly created arrays. --layout=dangerous can be used to avoid setting a layout so that they array can be used on older kernels. Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Detail.c b/Detail.c
index 24fa462..832485f 100644
--- a/Detail.c
+++ b/Detail.c
@@ -525,6 +525,11 @@ int Detail(char *dev, struct context *c)
printf(" Layout : %s\n",
str ? str : "-unknown-");
}
+ if (array.level == 0 && array.layout) {
+ str = map_num(r0layout, array.layout);
+ printf(" Layout : %s\n",
+ str ? str : "-unknown-");
+ }
if (array.level == 6) {
str = map_num(r6layout, array.layout);
printf(" Layout : %s\n",