From 095b600a5ede1a470325af72ceccee8eff9a7b3e Mon Sep 17 00:00:00 2001 From: Stefan Bader Date: Wed, 15 Jan 2020 10:14:28 +0100 Subject: [PATCH] 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 Acked-by: Marcelo Henrique Cerri Signed-off-by: Seth Forshee --- drivers/md/raid0.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 82738a1a1415..c3de0da62658 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -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) {