summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2019-11-04 04:27:49 +0100
committerJes Sorensen <jsorensen@fb.com>2019-12-02 22:14:49 +0100
commit329dfc28debb58ffe7bd1967cea00fc583139aca (patch)
tree91b570ff204f3356a2617b5cbaecee133627d74f /Detail.c
parentimsm: Change the way of printing nvme drives in detail-platform. (diff)
downloadmdadm-329dfc28debb58ffe7bd1967cea00fc583139aca.tar.xz
mdadm-329dfc28debb58ffe7bd1967cea00fc583139aca.zip
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 24fa462e..832485fe 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",