]> git.proxmox.com Git - mirror_zfs.git/commit
Add callback for zfs_multihost_interval
authorOlaf Faaland <faaland1@llnl.gov>
Fri, 21 Jul 2017 00:54:26 +0000 (17:54 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 25 Jul 2017 17:22:20 +0000 (13:22 -0400)
commit0582e403221008480657a88e8f50aecc88397c80
tree816e73fc296b9d21bcf30c02e06f7f6ea68a5cbd
parent60f510344596b1f2f890df2e96282d586edf6aaf
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 <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #6387
cmd/ztest/ztest.c
include/sys/mmp.h
module/zfs/mmp.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/mmp/Makefile.am
tests/zfs-tests/tests/functional/mmp/mmp.cfg
tests/zfs-tests/tests/functional/mmp/mmp_reset_interval.ksh [new file with mode: 0755]