aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/lzo.c
diff options
context:
space:
mode:
authorGravatar Qu Wenruo <wqu@suse.com> 2020-12-02 14:47:59 +0800
committerGravatar David Sterba <dsterba@suse.com> 2020-12-09 19:16:09 +0100
commitf44cf41075b05660d61efa7bfa8350b45286f065 (patch)
tree219838815a6ce07590b6d239cf5ff540e737a51d /fs/btrfs/lzo.c
parentbtrfs: pass bio_offset to check_data_csum() directly (diff)
downloadlinux-f44cf41075b05660d61efa7bfa8350b45286f065.tar.gz
linux-f44cf41075b05660d61efa7bfa8350b45286f065.tar.bz2
linux-f44cf41075b05660d61efa7bfa8350b45286f065.zip
btrfs: make btrfs_verify_data_csum follow sector size
Currently btrfs_verify_data_csum() just passes the whole page to check_data_csum(), which is fine since we only support sectorsize == PAGE_SIZE. To support subpage, we need to properly honor per-sector checksum verification, just like what we did in dio read path. This patch will do the csum verification in a for loop, starts with pg_off == start - page_offset(page), with sectorsize increase for each loop. For sectorsize == PAGE_SIZE case, the pg_off will always be 0, and we will only loop once. For subpage case, we do the iterate over each sector and if we found any error, we return error. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/lzo.c')
0 files changed, 0 insertions, 0 deletions