Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
mdadm.1739
0001-config-new-option-to-suppress-adding-bad-b...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-config-new-option-to-suppress-adding-bad-block-lists.patch of Package mdadm.1739
From e2efe9e7bc73307f74a4c2e2197d6d4498dd46f0 Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.de> Date: Thu, 7 Aug 2014 12:23:45 +1000 Subject: [PATCH] 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> --- config.c | 5 +++++ mdadm.conf.5 | 14 ++++++++++++-- mdadm.h | 1 + super1.c | 4 ++++ 4 files changed, 22 insertions(+), 2 deletions(-) --- a/config.c +++ b/config.c @@ -188,6 +188,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, @@ -307,6 +308,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); --- a/mdadm.conf.5 +++ b/mdadm.conf.5 @@ -293,8 +293,8 @@ line and it should be give only one prog .B CREATE The .B create -line gives default values to be used when creating arrays and device entries for -arrays. +line gives default values to be used when creating arrays, new members +of arrays, and device entries for arrays. These include: .RS 4 @@ -365,6 +365,16 @@ is given, then non-numeric device names will not be used even if the default changes in a future release of .IR mdadm . + +.TP +.B bbl=no +By default, +.I mdadm +will reserve space for a bad block list (bbl) on all devices +included in or added to any array that supports them. Setting +.B bbl=no +will prevent this, so newly added devices will not have a bad +block log. .RE .TP --- a/mdadm.h +++ b/mdadm.h @@ -258,6 +258,7 @@ struct createinfo { int mode; int symlinks; int names; + int bblist; struct supertype *supertype; }; --- a/super1.c +++ b/super1.c @@ -1768,6 +1768,10 @@ static int write_init_super1(struct supe 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);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor