diff options
author | NeilBrown <neilb@suse.de> | 2012-10-03 17:07:13 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-03 17:07:13 +1000 |
commit | 688e99a77d04d1581850074ff11491acf5fb57c5 (patch) | |
tree | f2e558a67a50592ceb74afaf682b3658ba0c8efe /mdadm.c | |
parent | bf95d0f38cd35c01a258771bcc9e55b078e0726c (diff) |
Allow --update to add or remove space for a bad block list.
--update=bbl will add a bad block list to each device.
--update=no-bblk will remove the bad block list providing that it
is empty.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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); } |