summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-03 17:07:13 +1000
committerNeilBrown <neilb@suse.de>2012-10-03 17:07:13 +1000
commit688e99a77d04d1581850074ff11491acf5fb57c5 (patch)
treef2e558a67a50592ceb74afaf682b3658ba0c8efe /mdadm.c
parentbf95d0f38cd35c01a258771bcc9e55b078e0726c (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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mdadm.c b/mdadm.c
index 3ee7ddba..0f7bed91 100644
--- 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);
}