When mdmon is absent metadata is not updated, and container_reshape() can fall in to endless loop. This can cause user data corruption. In case when mdmon is absent do not continue container reshape process. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Grow.c b/Grow.c index e7fd7c4..184a973 100644 --- a/Grow.c +++ b/Grow.c @@ -2562,6 +2562,12 @@ int reshape_container(char *container, char *devname, restart = 0; if (rv) break; + rv = !mdmon_running(devname2devnum(container)); + if (rv) { + printf(Name ": Mdmon is not found. " + "Cannot continue container reshape.\n"); + break; + } } if (!rv) unfreeze(st); -- 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