]> git.proxmox.com Git - mirror_ubuntu-impish-kernel.git/commitdiff
UBUNTU: SAUCE: md/raid0: Use kernel specific layout
authorStefan Bader <stefan.bader@canonical.com>
Wed, 15 Jan 2020 09:14:28 +0000 (10:14 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 28 Jun 2021 06:03:50 +0000 (08:03 +0200)
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>
drivers/md/raid0.c

index 9a420f81b6d8d5384af88fb5c5338a4b290b0c40..cbc3fbe7b54aa22966deb22df2d36a3886fb57e8 100644 (file)
@@ -137,13 +137,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",
+               conf->layout = RAID0_ALT_MULTIZONE_LAYOUT;
+               pr_warn("md/raid0:%s: !!! DEFAULTING TO ALTERNATE LAYOUT !!!\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 = -ENOTSUPP;
-               goto abort;
+               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");
        }
        /*
         * now since we have the hard sector sizes, we can make sure