]> git.proxmox.com Git - mirror_zfs.git/commit
Fix ztest deadlock in spa_vdev_remove()
authorTom Caputi <tcaputi@datto.com>
Tue, 4 Dec 2018 17:54:05 +0000 (12:54 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Dec 2018 17:54:05 +0000 (09:54 -0800)
commitfedef6dd592cf6e83ab8fc8b81e5407d64f79996
treedccf313d0b46be313944d59bd8b5a934b4b2e49d
parent0b606cb33fd1c43a4eea416e48d81127373c20ea
Fix ztest deadlock in spa_vdev_remove()

This patch corrects an issue where spa_vdev_remove() would
call spa_history_log_internal() while holding the spa config
lock. This function may decide to block until the next txg if
the current one seems too full. However, since the thread is
holding the config log, the txg sync thread cannot progress
and the system ends up deadlocked. This patch simply moves
all calls to spa_history_log_internal() outside of the config
lock.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8162
module/zfs/vdev_removal.c