aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOlaf Faaland <[email protected]>2017-07-20 17:54:26 -0700
committerBrian Behlendorf <[email protected]>2017-07-25 13:22:20 -0400
commit0582e403221008480657a88e8f50aecc88397c80 (patch)
tree816e73fc296b9d21bcf30c02e06f7f6ea68a5cbd /include
parent60f510344596b1f2f890df2e96282d586edf6aaf (diff)
Add callback for zfs_multihost_interval
Add a callback to wake all running mmp threads when zfs_multihost_interval is changed. This is necessary when the interval is changed from a very large value to a significantly lower one, while pools are imported that have the multihost property enabled. Without this commit, the mmp thread does not wake up and detect the new interval until after it has waited the old multihost interval time. A user monitoring mmp writes via the provided kstat would be led to believe that the changed setting did not work. Added a test in the ZTS under mmp to verify the new functionality is working. Added a test to ztest which starts and stops mmp threads, and calls into the code to signal sleeping mmp threads, to test for deadlocks or similar locking issues. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #6387
Diffstat (limited to 'include')
-rw-r--r--include/sys/mmp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/mmp.h b/include/sys/mmp.h
index 4da612d6a..5b2fea1a6 100644
--- a/include/sys/mmp.h
+++ b/include/sys/mmp.h
@@ -50,6 +50,7 @@ extern void mmp_fini(struct spa *spa);
extern void mmp_thread_start(struct spa *spa);
extern void mmp_thread_stop(struct spa *spa);
extern void mmp_update_uberblock(struct spa *spa, struct uberblock *ub);
+extern void mmp_signal_all_threads(void);
/* Global tuning */
extern ulong_t zfs_multihost_interval;