HomeFreeBSD

Add ability to scrub from last scrubbed txg

Description

Add ability to scrub from last scrubbed txg

Some users might want to scrub only new data because they would like
to know if the new write wasn't corrupted. This PR adds possibility
scrub only newly written data.

This introduces new last_scrubbed_txg property, indicating the
transaction group (TXG) up to which the most recent scrub operation
has checked and repaired the dataset, so users can run scrub only
from the last saved point. We use a scn_max_txg and scn_min_txg
which are already built into scrub, to accomplish that.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
Sponsored-By: Wasabi Technology, Inc.
Sponsored-By: Klara Inc.
Closes #16301

Details

Provenance
oshogboAuthored on Dec 4 2024, 7:21 PM
GitHub <noreply@github.com>Committed on Dec 4 2024, 7:21 PM
Parents
rG1cd2419ece5c: Fix race in libzfs_run_process_impl
Branches
Unknown
Tags
Unknown