summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-12 12:47:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-12 12:47:09 +0000
commitb959dcfcd0319d4311e67fa40ebb407605efc9d9 (patch)
treeac91bd6261967ff19b62a1859a4f544112ec4522 /Incremental.c
parentReleasing debian version 4.2+20230313-1. (diff)
downloadmdadm-b959dcfcd0319d4311e67fa40ebb407605efc9d9.tar.xz
mdadm-b959dcfcd0319d4311e67fa40ebb407605efc9d9.zip
Merging upstream version 4.2+20230508.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Incremental.c b/Incremental.c
index 09b94b9..f13ce02 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -202,8 +202,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
if (!match && rv == 2)
goto out;
- if (match && match->devname &&
- strcasecmp(match->devname, "<ignore>") == 0) {
+ if (match && match->devname && is_devname_ignore(match->devname) == true) {
if (c->verbose >= 0)
pr_err("array containing %s is explicitly ignored by mdadm.conf\n",
devname);
@@ -460,8 +459,8 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
info.array.working_disks ++;
}
- if (strncmp(chosen_name, "/dev/md/", 8) == 0)
- md_devname = chosen_name+8;
+ if (strncmp(chosen_name, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0)
+ md_devname = chosen_name + DEV_MD_DIR_LEN;
else
md_devname = chosen_name;
if (c->export) {
@@ -507,6 +506,9 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
GET_OFFSET | GET_SIZE));
active_disks = count_active(st, sra, mdfd, &avail, &info);
+ if (!avail)
+ goto out_unlock;
+
journal_device_missing = (info.journal_device_required) && (info.journal_clean == 0);
if (info.consistency_policy == CONSISTENCY_POLICY_PPL)
@@ -1564,8 +1566,7 @@ static int Incremental_container(struct supertype *st, char *devname,
break;
}
- if (match && match->devname &&
- strcasecmp(match->devname, "<ignore>") == 0) {
+ if (match && match->devname && is_devname_ignore(match->devname) == true) {
if (c->verbose > 0)
pr_err("array %s/%s is explicitly ignored by mdadm.conf\n",
match->container, match->member);