Skip to content

Commit

Permalink
btrfs-progs: check: explicit holes in log tree don't get csummed
Browse files Browse the repository at this point in the history
Fix a false positive in btrfs check, where we were returning an error
because an explicit hole in the log tree had no associated csum entry.

Signed-off-by: Mark Harmstone <[email protected]>
  • Loading branch information
maharmstone authored and adam900710 committed Oct 20, 2024
1 parent 2595fbf commit f6dc0e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions check/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9694,6 +9694,10 @@ static int check_log_csum(struct btrfs_root *root, u64 addr, u64 length)
u64 data_len;
int ret;

/* Explicit holes don't get csummed */
if (addr == 0)
return 0;

ret = btrfs_search_slot(NULL, root, &key, &path, 0, 0);
if (ret < 0)
return ret;
Expand Down

0 comments on commit f6dc0e8

Please sign in to comment.