summaryrefslogtreecommitdiffstats
path: root/include/sys/mmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys/mmp.h')
-rw-r--r--include/sys/mmp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sys/mmp.h b/include/sys/mmp.h
index 6f4672a38..527e3323b 100644
--- a/include/sys/mmp.h
+++ b/include/sys/mmp.h
@@ -31,6 +31,11 @@ extern "C" {
#define MMP_DEFAULT_INTERVAL 1000 /* ms */
#define MMP_DEFAULT_IMPORT_INTERVALS 20
#define MMP_DEFAULT_FAIL_INTERVALS 10
+#define MMP_MIN_FAIL_INTERVALS 2 /* min if != 0 */
+#define MMP_IMPORT_SAFETY_FACTOR 200 /* pct */
+#define MMP_INTERVAL_OK(interval) MAX(interval, MMP_MIN_INTERVAL)
+#define MMP_FAIL_INTVS_OK(fails) (fails == 0 ? 0 : MAX(fails, \
+ MMP_MIN_FAIL_INTERVALS))
typedef struct mmp_thread {
kmutex_t mmp_thread_lock; /* protect thread mgmt fields */
@@ -46,6 +51,7 @@ typedef struct mmp_thread {
int mmp_skip_error; /* reason for last skipped write */
vdev_t *mmp_last_leaf; /* last mmp write sent here */
uint64_t mmp_leaf_last_gen; /* last mmp write sent here */
+ uint32_t mmp_seq; /* intra-second update counter */
} mmp_thread_t;