diff options
author | John L. Hammond <[email protected]> | 2018-01-17 14:24:42 -0600 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2018-03-14 16:10:36 -0700 |
commit | ecc972c7f009e1fa75900e276a4c1306c55b5722 (patch) | |
tree | 0c1d669980a1e78035b128c8aca85a6647670f91 /module/zfs/mmp.c | |
parent | 6c891ade8bee9c54484d5cf9b939582b7a9b7eeb (diff) |
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 <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: John L. Hammond <[email protected]>
Closes #7048
Diffstat (limited to 'module/zfs/mmp.c')
-rw-r--r-- | module/zfs/mmp.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <sys/mmp.h> #include <sys/spa.h> #include <sys/spa_impl.h> +#include <sys/time.h> #include <sys/vdev.h> #include <sys/vdev_impl.h> #include <sys/zfs_context.h> @@ -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); } |