HomeFreeBSD

Fix vdev_initialize_restart / removal race

Description

Fix vdev_initialize_restart / removal race

Resolve a vdev_initialize crash uncovered by ztest. Similar
to when starting a new initialization verify that a removal
is not in progress. Additionally, do not restart when the
thread already exists. This check is now congruent with the
POOL_INITIALIZE_DO handling in spa_vdev_initialize_impl().

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8477

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Mar 12 2019, 5:39 PM
GitHub <noreply@github.com>Committed on Mar 12 2019, 5:39 PM
Parents
rG3d31aad83e64: MMP writes rotate over leaves
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGdd785b5b86bb: Fix vdev_initialize_restart / removal race (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Mar 12 2019, 5:39 PM