summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-08-07 12:23:45 +1000
committerNeilBrown <neilb@suse.de>2014-08-07 12:23:45 +1000
commite2efe9e7bc73307f74a4c2e2197d6d4498dd46f0 (patch)
tree4d52e56150be5c309883760bdd84a17fa9a3c4ed /config.c
parent968d2a336ef0199155a6dced1624909180d29c9a (diff)
config: new option to suppress adding bad block lists.
CREATE bbl=no in mdadm.conf will cause any devices added to an array to not have a bad block list. By default they do for 1.x metadata. This is useful if you are suspicious of the bad-block-list implementation. Reported-by: Ethan Wilson <ethan.wilson@shiftmail.org> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index a35807cc..909f83f4 100644
--- a/config.c
+++ b/config.c
@@ -187,6 +187,7 @@ struct createinfo createinfo = {
.autof = 2, /* by default, create devices with standard names */
.symlinks = 1,
.names = 0, /* By default, stick with numbered md devices. */
+ .bblist = 1, /* Use a bad block list by default */
#ifdef DEBIAN
.gid = 6, /* disk */
.mode = 0660,
@@ -306,6 +307,10 @@ static void createline(char *line)
createinfo.names = 1;
else if (strncasecmp(w, "names=no", 11) == 0)
createinfo.names = 0;
+ else if (strncasecmp(w, "bbl=no", 11) == 0)
+ createinfo.bblist = 0;
+ else if (strncasecmp(w, "bbl=yes", 11) == 0)
+ createinfo.bblist = 1;
else {
pr_err("unrecognised word on CREATE line: %s\n",
w);