summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2015-12-21 14:56:38 +1100
committerNeilBrown <neilb@suse.com>2015-12-21 14:56:38 +1100
commit6dd16dac40010a23c4e7e14b69703f4296c60496 (patch)
tree535f364144012a582e9c079294b0938f2b05f9a8 /super1.c
parenta0d12d51a7a12d14963f60d99bad6e71c7d0b202 (diff)
downloadmdadm-6dd16dac40010a23c4e7e14b69703f4296c60496.tar.gz
Add --update=force-no-bbl.
This forcibly removed the bad-block log. There can be situations where it is hard to remove bad blocks by writing to them - partiularly on RAID5. Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 2df590e..10e0065 100644
--- a/super1.c
+++ b/super1.c
@@ -1282,6 +1282,11 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
sb->bblog_shift = 0;
sb->bblog_offset = 0;
}
+ } else if (strcmp(update, "force-no-bbl") == 0) {
+ sb->feature_map &= ~ __cpu_to_le32(MD_FEATURE_BAD_BLOCKS);
+ sb->bblog_size = 0;
+ sb->bblog_shift = 0;
+ sb->bblog_offset = 0;
} else if (strcmp(update, "name") == 0) {
if (info->name[0] == 0)
sprintf(info->name, "%d", info->array.md_minor);