in case configuration: raid5 raid0 first array is monitored only. During reshape of such container first array (raid5), in metadata migration is initialized for both arrays. This is imsm incompatible case. Allow for 2nd array in metadata reshape initialization when there is more than 1 array monitored. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- super-intel.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/super-intel.c b/super-intel.c index 1db15c2..c465288 100644 --- a/super-intel.c +++ b/super-intel.c @@ -5075,10 +5075,20 @@ static int imsm_set_array_state(struct active_array *a, int consistent) */ struct active_array *aa = a->container->arrays; int arrays_under_reshape = 0; + int array_counter = 0; /* check if no other arrays is under reshape */ while (aa) { + array_counter++; + /* when we have takeovered array even single array + * can be initialized for reshape, if mdadm didn't + * do this. + * This is due to fact, that raid0 (takeovered to raid4) + * appears in monitor one by one + */ + if (aa->info.array.level == 4) + array_counter++; if (aa->container) { int inst = aa->info.container_member; struct intel_super *super = aa->container->sb; @@ -5091,7 +5101,7 @@ static int imsm_set_array_state(struct active_array *a, int consistent) } aa = aa->next; } - if (arrays_under_reshape == 0) { + if ((arrays_under_reshape == 0) && (array_counter > 1)) { struct imsm_map *map = get_imsm_map(dev, 0); struct dl *dl = NULL; int disks_count = 0; -- 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