From: John L. Hammond <35266395+jhammond-intel@users.noreply.github.com> Date: Wed, 17 Jan 2018 20:24:42 +0000 (-0600) Subject: Emit an error message before MMP suspends pool X-Git-Tag: zfs-0.7.7~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ecc972c7f009e1fa75900e276a4c1306c55b5722;p=zfs Emit an error message before MMP suspends pool In mmp_thread(), emit an MMP specific error message before calling zio_suspend() so that the administrator will understand why the pool is being suspended. Reviewed-by: Olaf Faaland Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: John L. Hammond Closes #7048 --- diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c index 6f2aa3f59..e91ae628a 100644 --- a/module/zfs/mmp.c +++ b/module/zfs/mmp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -428,6 +429,10 @@ mmp_thread(spa_t *spa) */ if (!suspended && mmp_fail_intervals && multihost && (start - mmp->mmp_last_write) > max_fail_ns) { + cmn_err(CE_WARN, "MMP writes to pool '%s' have not " + "succeeded in over %llus; suspending pool", + spa_name(spa), + NSEC2SEC(start - mmp->mmp_last_write)); zio_suspend(spa, NULL); }