diff options
author | NeilBrown <neilb@suse.de> | 2010-11-30 16:46:01 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-11-30 16:46:01 +1100 |
commit | 5a31170d95236fdfd35a62cd3d7345ac43a75104 (patch) | |
tree | 1544cccc6e7c911dfbee9411117cce80768c2c96 /super0.c | |
parent | ff63406404b1a715282180570af7a4f1afabe634 (diff) |
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 'super0.c')
-rw-r--r-- | super0.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -418,8 +418,9 @@ static int update_super0(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; mdp_super_t *sb = st->sb; @@ -548,6 +549,8 @@ static int update_super0(struct supertype *st, struct mdinfo *info, bm = (struct bitmap_super_s*)(sb+1); uuid_from_super0(st, (int*)bm->uuid); } + } else if (strcmp(update, "no-bitmap") == 0) { + sb->state &= ~(1<<MD_SB_BITMAP_PRESENT); } else if (strcmp(update, "_reshape_progress")==0) sb->reshape_position = info->reshape_progress; else |