On 10/04/2017 04:18 AM, Tomasz Majchrzak wrote:
After switch root new mdmon is started. It sends initrd mdmon a signal to terminate. initrd mdmon receives it and switches the safe mode delay to 1 ms in order to get array to clean state and flush last version of metadata. The problem is sysfs filesystem is not available to initrd mdmon after switch root so the original safe mode delay is unchanged. The delay is set to few seconds - if there is a lot of traffic on the filesystem, initrd mdmon doesn't terminate for a long time (no clean state). There are 2 instances of mdmon. initrd mdmon flushes metadata when array goes to clean state but this metadata might be already outdated. Use file descriptor obtained on mdmon start to change safe mode delay. Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@xxxxxxxxx> --- managemon.c | 16 +++++++++++++--- mdmon.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-)
Applied! Thanks, Jes -- 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