When md starts array and reshape position is set, md continues reshape automatically. To prevent doing this for external metadata to allow for later reshape configuration, clear temporary reshape_active flag this causes that reshape parameters will not be set to array and md will not start reshape. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Assemble.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/Assemble.c b/Assemble.c index 4d41081..bffbbf0 100644 --- a/Assemble.c +++ b/Assemble.c @@ -1506,15 +1506,18 @@ int assemble_container_content(struct supertype *st, int mdfd, int working = 0, preexist = 0; int expansion = 0; struct map_ent *map = NULL; + int reshape_active; sysfs_init(content, mdfd, 0); - + reshape_active = content->reshape_active; + content->reshape_active = 0; sra = sysfs_read(mdfd, 0, GET_VERSION); if (sra == NULL || strcmp(sra->text_version, content->text_version) != 0) if (sysfs_set_array(content, md_get_version(mdfd)) != 0) { close(mdfd); return 1; } + content->reshape_active = reshape_active; if (sra) sysfs_free(sra); -- 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