Default value: \fB3,000\fR.
.RE
+.sp
+.ne 2
+.na
+\fBzfs_scan_ignore_errors\fR (int)
+.ad
+.RS 12n
+If set to a nonzero value, remove the DTL (dirty time list) upon
+completion of a pool scan (scrub) even if there were unrepairable
+errors. It is intended to be used during pool repair or recovery to
+stop resilvering when the pool is next imported.
+.sp
+Default value: \fB0\fR.
+.RE
+
.sp
.ne 2
.na
*/
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.
*/
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
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