]> granicus.if.org Git - zfs/commitdiff
Emit an error message before MMP suspends pool
authorJohn L. Hammond <35266395+jhammond-intel@users.noreply.github.com>
Wed, 17 Jan 2018 20:24:42 +0000 (14:24 -0600)
committerTony Hutter <hutter2@llnl.gov>
Wed, 14 Mar 2018 23:10:36 +0000 (16:10 -0700)
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 <faaland1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Closes #7048

module/zfs/mmp.c

index 6f2aa3f5931533d87e6780cd24b9973fd2138aaf..e91ae628ab2e3095cd6302d8bb357668814e7956 100644 (file)
@@ -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);
                }