diff options
author | NeilBrown <neilb@suse.de> | 2019-11-04 04:27:49 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2019-12-02 22:14:49 +0100 |
commit | 329dfc28debb58ffe7bd1967cea00fc583139aca (patch) | |
tree | 91b570ff204f3356a2617b5cbaecee133627d74f /Detail.c | |
parent | imsm: Change the way of printing nvme drives in detail-platform. (diff) | |
download | mdadm-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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", |