btrfs-progs: check: explicit holes in log tree don't get csummed
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 <maharmstone@fb.com>
This commit is contained in:
parent
2595fbfa21
commit
f6dc0e860f
|
@ -9694,6 +9694,10 @@ static int check_log_csum(struct btrfs_root *root, u64 addr, u64 length)
|
||||||
u64 data_len;
|
u64 data_len;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* Explicit holes don't get csummed */
|
||||||
|
if (addr == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = btrfs_search_slot(NULL, root, &key, &path, 0, 0);
|
ret = btrfs_search_slot(NULL, root, &key, &path, 0, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue