]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: allow --assume-clean to work.
authorNeilBrown <neilb@suse.de>
Thu, 4 Oct 2012 06:51:22 +0000 (16:51 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 4 Oct 2012 06:51:22 +0000 (16:51 +1000)
We must avoid setting IMSM_T_STATE_UNINITIALIZED if the
array was declared to be clean due to --assume-clean.

Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index e311d0c8c175a005017a59c9ced19eff250ed2d1..80c0f8de77567c6cfa00bb407100587f7d213a7e 100644 (file)
@@ -4673,7 +4673,8 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
        map->blocks_per_strip = __cpu_to_le16(info_to_blocks_per_strip(info));
        map->failed_disk_num = ~0;
        if (info->level > 0)
-               map->map_state = IMSM_T_STATE_UNINITIALIZED;
+               map->map_state = (info->state ? IMSM_T_STATE_NORMAL
+                                 : IMSM_T_STATE_UNINITIALIZED);
        else
                map->map_state = info->failed_disks ? IMSM_T_STATE_FAILED :
                                                      IMSM_T_STATE_NORMAL;