Skip to content

Commit

Permalink
Emit an error message before MMP suspends pool
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jhammond-intel authored and tonyhutter committed Mar 14, 2018
1 parent 6c891ad commit ecc972c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions module/zfs/mmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit ecc972c

Please sign in to comment.