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 <behlendorf1@llnl.gov>
Signed-off-by: Alan Somers <asomers@gmail.com>
Closes #11470
This commit is contained in:
Alan Somers
2021-01-12 15:25:52 -07:00
committed by Brian Behlendorf
parent 67874d5487
commit cf0977ad72
3 changed files with 41 additions and 3 deletions
+2
View File
@@ -271,7 +271,9 @@ struct vdev {
boolean_t vdev_nonrot; /* true if solid state */
int vdev_load_error; /* error on last load */
int vdev_open_error; /* error on last open */
int vdev_validate_error; /* error on last validate */
kthread_t *vdev_open_thread; /* thread opening children */
kthread_t *vdev_validate_thread; /* thread validating children */
uint64_t vdev_crtxg; /* txg when top-level was added */
/*