UBUNTU: SAUCE: md/raid0: Use kernel specific layout

BugLink: https://bugs.launchpad.net/bugs/1850540

This allows to roll out the support for the alternate layout which
accidentally got introduced since kernel v3.14+ without causing
breakage on reboot. The real danger is moving between a 3.13 or
older kernel and any newer. This either has already happened and
the damage has potentially been done or is not yet immediate or
not happening at all (if the raid0 array was created by a 3.14+
kernel). So it is better to just warn from the kernel or once the
user-space tool supporting meta-data update gets rolled out, from
there as well.

Once user-space is in place an with a bit of waiting time this change
should get reverted later.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
This commit is contained in:
Stefan Bader
2020-01-15 10:14:28 +01:00
committed by Paolo Pisati
parent f95a25ca27
commit 095b600a5e
+6 -7
View File
@@ -263,13 +263,12 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
default_layout == RAID0_ALT_MULTIZONE_LAYOUT) {
conf->layout = default_layout;
} else {
pr_err("md/raid0:%s: cannot assemble multi-zone RAID0 with default_layout setting\n",
mdname(mddev));
pr_err("md/raid0: please set raid0.default_layout to 1 or 2\n");
pr_err("md/raid0: Read the following page for more information:\n");
pr_err("md/raid0: https://wiki.ubuntu.com/Kernel/Raid0LayoutMigration\n");
err = -EOPNOTSUPP;
goto abort;
conf->layout = RAID0_ALT_MULTIZONE_LAYOUT;
pr_warn("md/raid0:%s: !!! DEFAULTING TO ALTERNATE LAYOUT !!!\n",
mdname(mddev));
pr_warn("md/raid0: Please set raid0.default_layout to 1 or 2\n");
pr_warn("md/raid0: Read the following page for more information:\n");
pr_warn("md/raid0: https://wiki.ubuntu.com/Kernel/Raid0LayoutMigration\n");
}
if (conf->layout == RAID0_ORIG_LAYOUT) {