]> granicus.if.org Git - zfs/commit
Fix vdev removal finishing race
authorTom Caputi <tcaputi@datto.com>
Wed, 7 Nov 2018 23:38:10 +0000 (18:38 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 7 Nov 2018 23:38:10 +0000 (15:38 -0800)
commitac53e50f799b39d9cd04e5ecc0a6552c9490c84a
treec427e7d429dedd9057bffb2646d0411d8b67a250
parent4021ba4cfaa861602ae75d45713224d5a7866004
Fix vdev removal finishing race

This patch fixes a race condition where the end of
vdev_remove_replace_with_indirect(), which holds
svr_lock, would race against spa_vdev_removal_destroy(),
which destroys the same lock and is called asynchronously
via dsl_sync_task_nowait().

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Issue #6900
Closes #8083
module/zfs/vdev_removal.c