Files
freebsd/lib
Alexander Motin e124aaa207 Speed up pool rewind and allow it to tolerate minor damage
Importing a damaged pool with -F/-X could take days: every rewind
attempt scanned the whole pool, and it kept scanning long after it hit
an error that already disqualified the txg.  Worse, the scan is all or
nothing -- a single unreadable block of file meta-data rejects a txg
even when the pool itself is perfectly consistent, forcing the admin to
rewind much further back and lose unrelated data for no reason.

Abort the verification scan as soon as a txg is known to be unusable,
and skip the data scan entirely for attempts that are only looking for
a rewind target.  Then split the errors found into those that really
prevent the pool from working and those that only cost the contents of
some files, and add a new "zpool import -M" asking to accept the
latter.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Closes #18967
2026-09-03 09:21:59 -07:00
..