Allow sending corrupt snapshots even if metadata is corrupted #12541
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Allan Jude [email protected]
Sponsored-By: Klara Inc.
Sponsored-By: WHC Online Solutions Inc.
Motivation and Context
When a pool was damaged by having part of its disks overwritten, when it was recovered, a ZFS send would fail with EIO if a data block failed its checksum.
Setting the zfs_send_corrupt_data tunable, allowed the zfs send to continue, replacing the corrupted data.
However, when an corrupted blockpointer was encountered, the zfs send would return ECKSUM and stop.
This change allows the zfs send to continue, skipping over the unreadable objects.
Description
When zfs_send_corrupt_data is set, use the TRAVERSE_HARD flag, so
traverse_visitbp()
will not fail with ECKSUM if a blockpointer cannot be read, but rather will continue and send the objects it can.How Has This Been Tested?
A corrupted pool was able to complete a 9 TB zfs send that would otherwise fail after only a few GB of data.
Types of changes
Checklist:
Signed-off-by
.