]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use dsl_scan_setup_check() to setup a scrub
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 8 Apr 2021 21:33:15 +0000 (14:33 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 14 Apr 2021 20:19:49 +0000 (13:19 -0700)
commitf17d146ca616342a097739d49f110aa34fcc7676
tree3fa31820a038aa477d1ade8452e7a1894ebe5441
parenta35cadcf143c2a3dde462751a5620c30c92b219b
Use dsl_scan_setup_check() to setup a scrub

When a rebuild completes it will automatically schedule a follow up
scrub to verify all of the block checksums.  Before setting up the
scrub execute the counterpart dsl_scan_setup_check() function to
confirm the scrub can be started.  Prior to this change we'd only
check vdev_rebuild_active() which isn't as comprehensive, and using
the check function keeps all of this logic in one place.

Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11849
include/sys/dsl_scan.h
module/zfs/dsl_scan.c
module/zfs/vdev_rebuild.c