summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-02-05 15:50:29 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-02-09 09:08:38 +0100
commit476b00bdeeb6c004b3a758bd842b0fa9e4164508 (patch)
tree68fce19160d5aa509b904da9bd29b829ac5ad4f3 /Incremental.c
parentsuper1: remove support for name= in config (diff)
downloadmdadm-476b00bdeeb6c004b3a758bd842b0fa9e4164508.tar.xz
mdadm-476b00bdeeb6c004b3a758bd842b0fa9e4164508.zip
Revert "mdadm: remove container_enough logic"
Mentioned patch changes way of IMSM member arrays assembling, they are updated by every new drive incremental processes. Previously, member arrays were created and filled once, by last drive incremental process. We determined regressions with various impact. Unfortunately, initial testing didn't show them. Regressions are connected to drive appearance order and may not be reproducible on every configuration, there are at least two know issues for now: - sysfs attributes are filled using old metadata if there is outdated drive and it is enumerated first. - rebuild may be aborted and started from beginning after reboot, if drive under rebuild is enumerated as the last one. This reverts commit 4dde420fc3e24077ab926f79674eaae1b71de10b. It fixes checkpatch issues and reworks logic to remove empty "if" branch in Incremental. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Incremental.c b/Incremental.c
index 6cbc164a..30c07c03 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -1467,6 +1467,15 @@ static int Incremental_container(struct supertype *st, char *devname,
st->ss->getinfo_super(st, &info, NULL);
+ if (info.container_enough < 0 || (info.container_enough == 0 && c->runstop < 1)) {
+ if (c->export)
+ printf("MD_STARTED=no\n");
+ else if (c->verbose)
+ pr_err("Not enough devices to start the container.\n");
+
+ return 0;
+ }
+
match = conf_match(st, &info, devname, c->verbose, &rv);
if (match == NULL && rv == 2)
return rv;