diff options
author | 2020-09-15 10:41:40 -0500 | |
---|---|---|
committer | 2020-12-08 15:53:37 +0100 | |
commit | 949b32732eab33018283e0517cc528be10a3d085 (patch) | |
tree | 86a671f0fc5283014f3aab027eff9a0d7a719eef /fs/btrfs/scrub.c | |
parent | btrfs: calculate num_pages, reserve_bytes once in btrfs_buffered_write (diff) | |
download | linux-dev-949b32732eab33018283e0517cc528be10a3d085.tar.xz linux-dev-949b32732eab33018283e0517cc528be10a3d085.zip |
btrfs: use iosize while reading compressed pages
While using compression, a submitted bio is mapped with a compressed bio
which performs the read from disk, decompresses and returns uncompressed
data to original bio. The original bio must reflect the uncompressed
size (iosize) of the I/O to be performed, or else the page just gets the
decompressed I/O length of data (disk_io_size). The compressed bio
checks the extent map and gets the correct length while performing the
I/O from disk.
This came up in subpage work when only compressed length of the original
bio was filled in the page. This worked correctly for pagesize ==
sectorsize because both compressed and uncompressed data are at pagesize
boundaries, and would end up filling the requested page.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
0 files changed, 0 insertions, 0 deletions