diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-12 17:22:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-12 17:22:06 +0000 |
commit | 702eb8bf57b076e15e074f6a0c6fd04fb62546d9 (patch) | |
tree | e356c38fbe7b86af13593f321fa0da09a991e76f /config.c | |
parent | Adding upstream version 4.3+20241108. (diff) | |
download | mdadm-702eb8bf57b076e15e074f6a0c6fd04fb62546d9.tar.xz mdadm-702eb8bf57b076e15e074f6a0c6fd04fb62546d9.zip |
Adding upstream version 4.3+20241202.upstream/4.3+20241202upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -171,8 +171,7 @@ inline void ident_init(struct mddev_ident *ident) assert(ident); ident->assembled = false; - ident->bitmap_fd = -1; - ident->bitmap_file = NULL; + ident->btype = BitmapUnknown; ident->container = NULL; ident->devices = NULL; ident->devname = NULL; @@ -542,11 +541,19 @@ void arrayline(char *line) /* Ignore name in confile */ continue; } else if (strncasecmp(w, "bitmap=", 7) == 0) { - if (mis.bitmap_file) + if (mis.btype != BitmapUnknown) pr_err("only specify bitmap file once. %s ignored\n", w); - else - mis.bitmap_file = xstrdup(w + 7); + else { + char *bname = xstrdup(w + 7); + + if (strcmp(bname, STR_COMMON_NONE) == 0) + mis.btype = BitmapNone; + else if (strcmp(bname, "internal") == 0) + mis.btype = BitmapInternal; + else if (strcmp(bname, "clustered") == 0) + mis.btype = BitmapCluster; + } } else if (strncasecmp(w, "devices=", 8 ) == 0) { if (mis.devices) |