aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/uberblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/uberblock.c')
-rw-r--r--module/zfs/uberblock.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/module/zfs/uberblock.c b/module/zfs/uberblock.c
index 3b8526076..b8857d74d 100644
--- a/module/zfs/uberblock.c
+++ b/module/zfs/uberblock.c
@@ -26,6 +26,7 @@
#include <sys/zfs_context.h>
#include <sys/uberblock_impl.h>
#include <sys/vdev_impl.h>
+#include <sys/mmp.h>
int
uberblock_verify(uberblock_t *ub)
@@ -58,8 +59,15 @@ uberblock_update(uberblock_t *ub, vdev_t *rvd, uint64_t txg, uint64_t mmp_delay)
ub->ub_timestamp = gethrestime_sec();
ub->ub_software_version = SPA_VERSION;
ub->ub_mmp_magic = MMP_MAGIC;
- ub->ub_mmp_delay = spa_multihost(rvd->vdev_spa) ? mmp_delay : 0;
- ub->ub_mmp_seq = 0;
+ if (spa_multihost(rvd->vdev_spa)) {
+ ub->ub_mmp_delay = mmp_delay;
+ ub->ub_mmp_config = MMP_SEQ_SET(0) |
+ MMP_INTERVAL_SET(zfs_multihost_interval) |
+ MMP_FAIL_INT_SET(zfs_multihost_fail_intervals);
+ } else {
+ ub->ub_mmp_delay = 0;
+ ub->ub_mmp_config = 0;
+ }
ub->ub_checkpoint_txg = 0;
return (ub->ub_rootbp.blk_birth == txg);