HomeFreeBSD

Initialize mmp_last_write when the mmp thread starts

Description

Initialize mmp_last_write when the mmp thread starts

A great deal of time may go by between when mmp_init() is called and
the MMP thread starts, particularly if there are bad devices, because
there is I/O checking configs etc. If this time is too long,

    (gethrtime() - mmp_last_write) > mmp_fail_ns

at the time the MMP thread starts. If MMP is configured to suspend
the pool, the pool will be suspended immediately.

This can be seen in issue #10838

The value of mmp_last_write doesn't matter before the mmp thread
starts. To give the MMP thread time to issue and land MMP writes,
initialize mmp_last_write when the MMP thread starts.

Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #10873

Details

Provenance
Olaf Faaland <faaland1@llnl.gov>Authored on Sep 9 2020, 5:12 PM
GitHub <noreply@github.com>Committed on Sep 9 2020, 5:12 PM
Parents
rGcba6d8663881: FreeBSD: drop dependency on cryptodev module
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGa74259cea063: Initialize mmp_last_write when the mmp thread starts (authored by Olaf Faaland <faaland1@llnl.gov>).Sep 9 2020, 5:12 PM