]> 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, 18 Oct 2012 04:39:10 +0000 (15:39 +1100)
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 07ab9aeddf1bc9f02b6ac282551a070538100329..544cb05967dc8a7f8a33457e853798211b1952fe 100644 (file)
@@ -4678,7 +4678,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;