]> granicus.if.org Git - zfs/commit
Fix !zilog_is_dirty() assert during ztest
authorTom Caputi <tcaputi@datto.com>
Wed, 7 Nov 2018 23:46:50 +0000 (18:46 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 7 Nov 2018 23:46:50 +0000 (15:46 -0800)
commita2d88f778a31111fcf98ecf3a690888bab07055e
treef85e9f7edd278ba070028dd34c24a16e9344df9e
parent20eb30d08e24c2240a5d66e2e62893e784f586af
Fix !zilog_is_dirty() assert during ztest

ztest occasionally hits an assert that !zilog_is_dirty() during
zil_close(). This is caused by an interaction between 2 threads.
First, ztest_run() waits for each test thread to complete and
closes the associated dataset as soon as the thread joins. At
the same time, the ztest_vdev_add_remove() test may attempt to
remove the slog, which will open, dirty, and reset the logs on
every dataset in the pool (including those of other threads).
This patch simply ensures that we always join all of the test
threads before closing any datasets.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8094
cmd/ztest/ztest.c