diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-12 12:46:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-12 12:46:59 +0000 |
commit | 3941cbcb97446a72c096da27171a3144a36fdfb7 (patch) | |
tree | 738f5a17d7ec1bb2fb3d881950c3cf681eacb9ea /Incremental.c | |
parent | Adding upstream version 4.2+20230313. (diff) | |
download | mdadm-3941cbcb97446a72c096da27171a3144a36fdfb7.tar.xz mdadm-3941cbcb97446a72c096da27171a3144a36fdfb7.zip |
Adding upstream version 4.2+20230508.upstream/4.2+20230508
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 13 |
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); |