mirror_zfs/module
Olaf Faaland 5ac017fc04 Update mmp_delay on sync or skipped, failed write
When an MMP write is skipped, or fails, and time since
mts->mmp_last_write is already greater than mts->mmp_delay, increase
mts->mmp_delay.  The original code only updated mts->mmp_delay when a
write succeeded, but this results in the write(s) after delays and
failed write(s) reporting an ub_mmp_delay which is too low.

Update mmp_last_write and mmp_delay if a txg sync was successful.  At
least one uberblock was written, thus extending the time we can be sure
the pool will not be imported by another host.

Do not allow mmp_delay to go below (MSEC2NSEC(zfs_multihost_interval) /
vdev_count_leaves()) so that a period of frequent successful MMP writes,
e.g. due to frequent txg syncs, does not result in an import activity
check so short it is not reliable based on mmp thread writes alone.

Remove unnecessary local variable, start.  We do not use the start time
of the loop iteration.

Add a debug message in spa_activity_check() to allow verification of the
import_delay value and to prove the activity check occurred.

Alter the tests that import pools and attempt to detect an activity
check.  Calculate the expected duration of spa_activity_check() based on
module parameters at the time the import is performed, rather than a
fixed time set in mmp.cfg.  The fixed time may be wrong.  Also, use the
default zfs_multihost_interval value so the activity check is longer and
easier to recognize.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #7330
2018-05-07 17:19:57 -07:00
..
avl Fix uninitialized variable in avl_add() 2016-07-25 14:21:34 -07:00
icp Linux 4.14 compat: CONFIG_GCC_PLUGIN_RANDSTRUCT 2017-12-04 17:21:39 -08:00
nvpair Linux 4.14 compat: CONFIG_GCC_PLUGIN_RANDSTRUCT 2017-12-04 17:21:39 -08:00
unicode codebase style improvements for OpenZFS 6459 port 2017-01-22 13:25:40 -08:00
zcommon Change checksum & IO delay ratelimit values 2018-03-14 16:10:38 -07:00
zfs Update mmp_delay on sync or skipped, failed write 2018-05-07 17:19:57 -07:00
zpios Fedora 28: Fix misc bounds check compiler warnings 2018-05-07 17:19:57 -07:00
.gitignore Improve gitignore 2017-05-25 10:14:13 -07:00
Makefile.in GZIP compression offloading with QAT accelerator 2017-03-22 17:58:47 -07:00