diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-09 11:40:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-09 11:40:59 +0000 |
commit | ad73653d36c9bd59872479e3c41f8942c70945b9 (patch) | |
tree | f184315b3ad68109e86aa4bd5bba3de919bfa3e3 /Assemble.c | |
parent | Adding upstream version 4.3+20240723. (diff) | |
download | mdadm-ad73653d36c9bd59872479e3c41f8942c70945b9.tar.xz mdadm-ad73653d36c9bd59872479e3c41f8942c70945b9.zip |
Adding upstream version 4.3+20241108.upstream/4.3+20241108upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -23,6 +23,8 @@ */ #include "mdadm.h" +#include "xmalloc.h" + #include <ctype.h> mapping_t assemble_statuses[] = { @@ -114,14 +116,11 @@ static int is_member_busy(char *metadata_version) int busy = 0; for (ent = mdstat; ent; ent = ent->next) { - if (ent->metadata_version == NULL) - continue; - if (strncmp(ent->metadata_version, "external:", 9) != 0) - continue; - if (!is_subarray(&ent->metadata_version[9])) + if (!is_mdstat_ent_subarray(ent)) continue; + /* Skip first char - it can be '/' or '-' */ - if (strcmp(&ent->metadata_version[10], metadata_version+1) == 0) { + if (strcmp(&ent->metadata_version[10], metadata_version + 1) == 0) { busy = 1; break; } @@ -1574,8 +1573,7 @@ try_again: /* Ignore 'host:' prefix of name */ name = strchr(name, ':')+1; - mdfd = create_mddev(mddev, name, ident->autof, trustworthy, - chosen_name, 0); + mdfd = create_mddev(mddev, name, trustworthy, chosen_name, 0); } if (mdfd < 0) { st->ss->free_super(st); |