Do not allow for spare device activation while rebuild is in progress, when additional degradation occur. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- super-intel.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/super-intel.c b/super-intel.c index c6509af..973b22f 100644 --- a/super-intel.c +++ b/super-intel.c @@ -6784,6 +6784,14 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a, if (imsm_reshape_blocks_arrays_changes(super)) return NULL; + /* Cannot activate another spare if rebuild is in progress already + */ + if (is_rebuilding(dev)) { + dprintf("imsm: No spare activation allowed. " + "Rebuild in progress already.\n"); + return NULL; + } + if (a->info.array.level == 4) /* No repair for takeovered array * imsm doesn't support raid4 -- 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