When reshape is started metadata tells mdadm that reshape is active via reshape_active variable. When reshape is finished mdmon updates metadata to end reshape in metadata for current array. We have reload metadata to get this flag updated and switch to next array (if exists) for container reshape case. This is indicated by forked flag. Function has to returned to caller with reloaded metadata information /up to date/. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/Grow.c b/Grow.c index 519fbc2..3455115 100644 --- a/Grow.c +++ b/Grow.c @@ -2021,8 +2021,25 @@ static int reshape_array(char *container, int fd, char *devname, "to %s\n", devname, c); } out: - if (forked) + if (forked) { + if (!rv) { + if (container) + ping_monitor(container); + if (st->ss->external) { + /* Re-load the metadata as much + * could have changed + */ + int cfd = open_dev(st->container_dev); + if (cfd >= 0) { + st->ss->free_super(st); + st->ss->load_container(st, cfd, + container); + close(cfd); + } + } + } return 0; + } exit(0); case -1: fprintf(stderr, Name ": Cannot run child to monitor reshape: %s\n", -- 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