HomeFreeBSD

Fix vdev removal finishing race

Description

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

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Nov 7 2018, 11:38 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 7 2018, 11:38 PM
Parents
rG4021ba4cfaa8: Make vdev_set_deferred_resilver() recursive
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGac53e50f799b: Fix vdev removal finishing race (authored by Tom Caputi <tcaputi@datto.com>).Nov 7 2018, 11:38 PM