From: NeilBrown Date: Thu, 4 Oct 2012 06:51:22 +0000 (+1000) Subject: imsm: allow --assume-clean to work. X-Git-Tag: mdadm-3.3-rc1~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fffaf1ff484c54defd79d608adab6ec615c6e3b7;p=thirdparty%2Fmdadm.git imsm: allow --assume-clean to work. We must avoid setting IMSM_T_STATE_UNINITIALIZED if the array was declared to be clean due to --assume-clean. Signed-off-by: NeilBrown --- diff --git a/super-intel.c b/super-intel.c index e311d0c8..80c0f8de 100644 --- a/super-intel.c +++ b/super-intel.c @@ -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;