diff options
author | Alan Somers <[email protected]> | 2021-01-12 15:25:52 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-01-26 19:36:51 -0800 |
commit | cf0977ad72e97ae7d2aad1f0b6a2fe1a0209bbe7 (patch) | |
tree | f27444b3a2240ae85d06e77e1ebcd105470cc780 /module/zfs/vdev_label.c | |
parent | 67874d5487f74c11503cb4f195c7a658f628b168 (diff) |
Parallelize vdev_validate
The runtime of vdev_validate is dominated by the disk accesses in
vdev_label_read_config. Speed it up by validating all vdevs in
parallel using a taskq.
Sponsored by: Axcient
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alan Somers <[email protected]>
Closes #11470
Diffstat (limited to 'module/zfs/vdev_label.c')
-rw-r--r-- | module/zfs/vdev_label.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c index d5966e1bd..04202a9f8 100644 --- a/module/zfs/vdev_label.c +++ b/module/zfs/vdev_label.c @@ -763,7 +763,8 @@ vdev_label_read_config(vdev_t *vd, uint64_t txg) int flags = ZIO_FLAG_CONFIG_WRITER | ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE; - ASSERT(spa_config_held(spa, SCL_STATE_ALL, RW_WRITER) == SCL_STATE_ALL); + ASSERT(vd->vdev_validate_thread == curthread || + spa_config_held(spa, SCL_STATE_ALL, RW_WRITER) == SCL_STATE_ALL); if (!vdev_readable(vd)) return (NULL); |