]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super0.c
imsm: FIX: imsm_add_spare() wrongly tests spares list
[thirdparty/mdadm.git] / super0.c
index 74b05aeda9f08b27c219961176988fd23e92d162..d69d0c049ad81d5337a1432158c91e4d0cf08e66 100644 (file)
--- a/super0.c
+++ b/super0.c
@@ -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
@@ -917,6 +920,7 @@ static struct supertype *match_metadata_desc0(char *arg)
        if (!st) return st;
 
        memset(st, 0, sizeof(*st));
+       st->container_dev = NoMdDev;
        st->ss = &super0;
        st->info = NULL;
        st->minor_version = 90;