mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add zfs_scan_ignore_errors tunable
When it's set, a DTL range will be cleared even if its scan/scrub had errors. This allows to work around resilver/scrub upon import when the pool has errors. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Closes #7293
This commit is contained in:
committed by
Brian Behlendorf
parent
83362e8e67
commit
02638a30ef
@@ -66,6 +66,12 @@ unsigned int zfs_delays_per_second = 20;
|
||||
*/
|
||||
unsigned int zfs_checksums_per_second = 20;
|
||||
|
||||
/*
|
||||
* Ignore errors during scrub/resilver. Allows to work around resilver
|
||||
* upon import when there are pool errors.
|
||||
*/
|
||||
int zfs_scan_ignore_errors = 0;
|
||||
|
||||
/*
|
||||
* Virtual device management.
|
||||
*/
|
||||
@@ -1963,6 +1969,12 @@ vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, int scrub_done)
|
||||
|
||||
mutex_enter(&vd->vdev_dtl_lock);
|
||||
|
||||
/*
|
||||
* If requested, pretend the scan completed cleanly.
|
||||
*/
|
||||
if (zfs_scan_ignore_errors && scn)
|
||||
scn->scn_phys.scn_errors = 0;
|
||||
|
||||
/*
|
||||
* If we've completed a scan cleanly then determine
|
||||
* if this vdev should remove any DTLs. We only want to
|
||||
@@ -3777,5 +3789,9 @@ module_param(zfs_checksums_per_second, uint, 0644);
|
||||
MODULE_PARM_DESC(zfs_checksums_per_second, "Rate limit checksum events "
|
||||
"to this many checksum errors per second (do not set below zed"
|
||||
"threshold).");
|
||||
|
||||
module_param(zfs_scan_ignore_errors, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_scan_ignore_errors,
|
||||
"Ignore errors during resilver/scrub");
|
||||
/* END CSTYLED */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user