HomeFreeBSD

Fix vdev_rebuild_thread deadlock

Description

Fix vdev_rebuild_thread deadlock

The metaslab_disable() call may block waiting for a txg sync.
Therefore it's important that vdev_rebuild_thread release the
SCL_CONFIG read lock it is holding before this call. Failure
to do so can result in the txg_sync thread getting blocked
waiting for this lock which results in a deadlock.

Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewd-by: Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11647

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Feb 24 2021, 6:01 PM
GitHub <noreply@github.com>Committed on Feb 24 2021, 6:01 PM
Parents
rG75a089ed34be: Fix overly broad locking in spa_vdev_config_exit()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG8e43fa12c571: Fix vdev_rebuild_thread deadlock (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Feb 24 2021, 6:01 PM