summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-11-30 16:46:01 +1100
committerNeilBrown <neilb@suse.de>2011-03-10 17:21:43 +1100
commit1f9476aaf86cb465566b5a1cd5a2fb493531c2eb (patch)
tree2cd7d3ea6c8d619918dbb657f9406e2d42cdbf99 /super1.c
parent321e575910214cb66212a436729c18736542f6bb (diff)
downloadmdadm-1f9476aaf86cb465566b5a1cd5a2fb493531c2eb.tar.gz
Assemble: add --update=no-bitmap
This allows an array with a corrupt internal bitmap to be assembled without the bitmap. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/super1.c b/super1.c
index e8f59c6..457e2d6 100644
--- a/super1.c
+++ b/super1.c
@@ -643,8 +643,9 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
char *devname, int verbose,
int uuid_set, char *homehost)
{
- /* NOTE: for 'assemble' and 'force' we need to return non-zero if any change was made.
- * For others, the return value is ignored.
+ /* NOTE: for 'assemble' and 'force' we need to return non-zero
+ * if any change was made. For others, the return value is
+ * ignored.
*/
int rv = 0;
struct mdp_superblock_1 *sb = st->sb;
@@ -755,6 +756,8 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
bm = (struct bitmap_super_s*)(st->sb+1024);
memcpy(bm->uuid, sb->set_uuid, 16);
}
+ } else if (strcmp(update, "no-bitmap") == 0) {
+ sb->feature_map &= ~__cpu_to_le32(MD_FEATURE_BITMAP_OFFSET);
}
if (strcmp(update, "homehost") == 0 &&
homehost) {