]> granicus.if.org Git - zfs/commit
Fix ztest deadlock in ztest_zil_remount()
authorTom Caputi <tcaputi@datto.com>
Tue, 4 Dec 2018 17:43:31 +0000 (12:43 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Dec 2018 17:43:31 +0000 (09:43 -0800)
commit0b606cb33fd1c43a4eea416e48d81127373c20ea
tree60c1e81a4ec9d1f862ea337e518a59a7d31f3054
parentbdbd5477bcba03b1df1e02b3b89e795c99e2f4c8
Fix ztest deadlock in ztest_zil_remount()

This patch fixes a small race condition in ztest_zil_remount()
that could result in a deadlock. ztest_device_removal() calls
spa_vdev_remove() which may eventually call spa_reset_logs().
If ztest_zil_remount() attempts to call zil_close() while this
is happening, it may fail when it asserts !zilog_is_dirty(zilog).
This patch simply adds locking to correct the issue.

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