Array state change is blocked due to reshape action in progress metadata changes are during applying. '1' is returned to indicate that array is clean Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- super-intel.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/super-intel.c b/super-intel.c index 48e26b1..4cc02d7 100644 --- a/super-intel.c +++ b/super-intel.c @@ -4780,6 +4780,17 @@ static int imsm_set_array_state(struct active_array *a, int consistent) __u8 map_state = imsm_check_degraded(super, dev, failed); __u32 blocks_per_unit; + if (a->reshape_state != reshape_not_active) { + /* array state change is blocked due to reshape action + * metadata changes are during applying. + * + * '1' is returned to indicate that array is clean + */ + dprintf("imsm: imsm_set_array_state() called "\ + "during reshape.\n"); + return 1; + } + /* before we activate this array handle any missing disks */ if (consistent == 2) handle_missing(super, dev); @@ -5144,6 +5155,10 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a, dprintf("imsm: activate spare: inst=%d failed=%d (%d) level=%d\n", inst, failed, a->info.array.raid_disks, a->info.array.level); + + if (a->reshape_state != reshape_not_active) + return NULL; + if (imsm_check_degraded(super, dev, failed) != IMSM_T_STATE_DEGRADED) return NULL; -- 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