]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.c
Allow --update to add or remove space for a bad block list.
[thirdparty/mdadm.git] / mdadm.c
diff --git a/mdadm.c b/mdadm.c
index 3ee7ddbaf17be98d7a59253c0ff6f762449c2031..0f7bed91cf67466298c6ecd5adec4b1c3093dff0 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -713,6 +713,10 @@ int main(int argc, char *argv[])
                                continue;
                        if (strcmp(c.update, "no-bitmap")==0)
                                continue;
+                       if (strcmp(c.update, "bbl") == 0)
+                               continue;
+                       if (strcmp(c.update, "no-bbl") == 0)
+                               continue;
                        if (strcmp(c.update, "byteorder")==0) {
                                if (ss) {
                                        pr_err("must not set metadata"
@@ -760,8 +764,10 @@ int main(int argc, char *argv[])
                                exit(2);
                        }
                        c.update = optarg;
-                       if (strcmp(c.update, "devicesize") != 0) {
-                               pr_err("only 'devicesize' can be"
+                       if (strcmp(c.update, "devicesize") != 0 &&
+                           strcmp(c.update, "bbl") != 0 &&
+                           strcmp(c.update, "no-bbl") != 0) {
+                               pr_err("only 'devicesize', 'bbl' and 'no-bbl' can be"
                                        " updated with --re-add\n");
                                exit(2);
                        }