mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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