HomeFreeBSD

Add more control/visibility to spa_load_verify().

Description

Add more control/visibility to spa_load_verify().

Use error thresholds from policy to control whether to scrub data
and/or metadata. If threshold is set to UINT64_MAX, then caller
probably does not care about result and we may skip that part.

By default import neither set the data error threshold nor read
the error counter, so skip the data scrub for faster import.
Metadata are still scrubbed and fail if even single error found.

While there just for symmetry return number of metadata errors in
case threshold is not set to zero and we haven't reached it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #13022

Details

Provenance
mavAuthored on Feb 4 2022, 9:06 PM
GitHub <noreply@github.com>Committed on Feb 4 2022, 9:06 PM
Parents
rG2f14adacaa82: zfs_set_prop_nvlist: make it easier to spot the call to dsl_props_set
Branches
Unknown
Tags
Unknown