summaryrefslogtreecommitdiff
path: root/super1.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 /super1.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 'super1.c')
-rw-r--r--super1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 7fba9be0..9834594c 100644
--- a/super1.c
+++ b/super1.c
@@ -1688,6 +1688,10 @@ static int write_init_super1(struct supertype *st)
rv = -EINVAL;
goto out;
}
+ if (conf_get_create_info()->bblist == 0) {
+ sb->bblog_size = 0;
+ sb->bblog_offset = 0;
+ }
sb->sb_csum = calc_sb_1_csum(sb);
rv = store_super1(st, di->fd);