Skip to content

Commit cea0752

Browse files
allanjudetonyhutter
authored andcommitted
Allow sending corrupt snapshots even if metadata is corrupted
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. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Allan Jude <[email protected]> Sponsored-By: Klara Inc. Sponsored-By: WHC Online Solutions Inc. Closes openzfs#12541
1 parent 7d70f1e commit cea0752

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

module/zfs/dmu_send.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,6 +2054,8 @@ setup_to_thread(struct send_thread_arg *to_arg, objset_t *to_os,
20542054
to_arg->flags = TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA;
20552055
if (rawok)
20562056
to_arg->flags |= TRAVERSE_NO_DECRYPT;
2057+
if (zfs_send_corrupt_data)
2058+
to_arg->flags |= TRAVERSE_HARD;
20572059
to_arg->num_blocks_visited = &dssp->dss_blocks;
20582060
(void) thread_create(NULL, 0, send_traverse_thread, to_arg, 0,
20592061
curproc, TS_RUN, minclsyspri);

0 commit comments

Comments
 (0)