diff options
Diffstat (limited to 'check/mode-lowmem.c')
-rw-r--r-- | check/mode-lowmem.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 077e61d8..663cee11 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -1503,9 +1503,17 @@ static int check_file_extent(struct btrfs_root *root, struct btrfs_key *fkey, csum_found, search_len); } else if (extent_type == BTRFS_FILE_EXTENT_PREALLOC && csum_found > 0) { - err |= ODD_CSUM_ITEM; - error("root %llu EXTENT_DATA[%llu %llu] prealloc shouldn't have csum, but has: %llu", - root->objectid, fkey->objectid, fkey->offset, csum_found); + ret = check_prealloc_extent_written(root->fs_info, + disk_bytenr, disk_num_bytes); + if (ret < 0) + return ret; + if (ret == 0) { + err |= ODD_CSUM_ITEM; + error( +"root %llu EXTENT_DATA[%llu %llu] prealloc shouldn't have csum, but has: %llu", + root->objectid, fkey->objectid, fkey->offset, + csum_found); + } } /* Check EXTENT_DATA hole */ |