WSL2-Linux-Kernel/fs/btrfs
Goldwyn Rodrigues 949b32732e 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>
2020-12-08 15:53:37 +01:00
..
tests
Kconfig
Makefile
acl.c
async-thread.c
async-thread.h
backref.c
backref.h
block-group.c
block-group.h
block-rsv.c
block-rsv.h
btrfs_inode.h
check-integrity.c
check-integrity.h
compression.c
compression.h
ctree.c
ctree.h
delalloc-space.c
delalloc-space.h
delayed-inode.c
delayed-inode.h
delayed-ref.c
delayed-ref.h
dev-replace.c
dev-replace.h
dir-item.c
discard.c
discard.h
disk-io.c btrfs: calculate more accurate remaining time to sleep in transaction_kthread 2020-12-08 15:53:36 +01:00
disk-io.h
export.c
export.h
extent-io-tree.h
extent-tree.c
extent_io.c btrfs: use iosize while reading compressed pages 2020-12-08 15:53:37 +01:00
extent_io.h
extent_map.c
extent_map.h
file-item.c
file.c btrfs: calculate num_pages, reserve_bytes once in btrfs_buffered_write 2020-12-08 15:53:37 +01:00
free-space-cache.c
free-space-cache.h
free-space-tree.c
free-space-tree.h
inode-item.c
inode-map.c
inode-map.h
inode.c
ioctl.c
locking.c
locking.h
lzo.c
misc.h
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
props.c
props.h
qgroup.c
qgroup.h
raid56.c
raid56.h
rcu-string.h
reada.c
ref-verify.c
ref-verify.h
reflink.c
reflink.h
relocation.c
root-tree.c
scrub.c
send.c
send.h
space-info.c
space-info.h
struct-funcs.c
super.c
sysfs.c
sysfs.h
transaction.c
transaction.h
tree-checker.c
tree-checker.h
tree-defrag.c
tree-log.c
tree-log.h
ulist.c
ulist.h
uuid-tree.c
volumes.c
volumes.h
xattr.c
xattr.h
zlib.c
zstd.c