mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Fix overly broad spa config lock
The spa_txg_history_init_io() and spa_txg_history_fini_io() were mistakenly taking SCL_ALL when only SCL_CONFIG is required to access the vdev stats. This could result in a deadlock which was observed when running ztest. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8445
This commit is contained in:
@@ -3892,7 +3892,6 @@ vdev_get_stats_ex(vdev_t *vd, vdev_stat_t *vs, vdev_stat_ex_t *vsx)
|
||||
vs->vs_resilver_deferred = vd->vdev_resilver_deferred;
|
||||
}
|
||||
|
||||
ASSERT(spa_config_held(vd->vdev_spa, SCL_ALL, RW_READER) != 0);
|
||||
vdev_get_stats_ex_impl(vd, vs, vsx);
|
||||
mutex_exit(&vd->vdev_stat_lock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user