This is adaptation of previous fix to avoid problem appear again. If initial resync or recovery of a redundant array is not finished before it is stopped then during assembly md will start it as inactive. Writing readonly to array_state in assemble_container_content fails because md thinks the array is during reshape. In fact we only have a reshape if both current and previous map states are the same. Otherwise we may have resync or recovery. Setting reshape_active in such cases causes the issue. Signed-off-by: Anna Czarnowska <anna.czarnowska@xxxxxxxxx> Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> Signed-off-by: NeilBrown <neilb@xxxxxxx> --- super-intel.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/super-intel.c b/super-intel.c index 90faf27..4628f2d 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1758,8 +1758,9 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info, info->custom_array_size = __le32_to_cpu(dev->size_high); info->custom_array_size <<= 32; info->custom_array_size |= __le32_to_cpu(dev->size_low); - if (prev_map && map->map_state == prev_map->map_state) { - info->reshape_active = 1; + info->reshape_active = (prev_map != NULL) && + (map->map_state == prev_map->map_state); + if (info->reshape_active) { info->new_level = get_imsm_raid_level(map); info->new_layout = imsm_level_to_layout(info->new_level); info->new_chunk = __le16_to_cpu(map->blocks_per_strip) << 9; -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html