aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ordered-data.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2024-11-15 06:03:43 +0000
committerDavid Sterba <[email protected]>2025-03-18 19:35:48 +0000
commit0bb067ca64e35536f1f5d9ef6aaafc40f4833623 (patch)
treee8ed4c21e97d07927f6477b5d92c6f1a5b4fc4ec /fs/btrfs/ordered-data.c
parentbtrfs: prevent inline data extents read from touching blocks beyond its range (diff)
downloadkernel-0bb067ca64e35536f1f5d9ef6aaafc40f4833623.tar.gz
kernel-0bb067ca64e35536f1f5d9ef6aaafc40f4833623.zip
btrfs: fix the qgroup data free range for inline data extents
Inside function __cow_file_range_inline() since the inlined data no longer take any data space, we need to free up the reserved space. However the code is still using the old page size == sector size assumption, and will not handle subpage case well. Thankfully it is not going to cause any problems because we have two extra safe nets: - Inline data extents creation is disabled for sector size < page size cases for now But it won't stay that for long. - btrfs_qgroup_free_data() will only clear ranges which have been already reserved So even if we pass a range larger than what we need, it should still be fine, especially there is only reserved space for a single block at file offset 0 of an inline data extent. But just for the sake of consistency, fix the call site to use sectorsize instead of page size. Reviewed-by: Filipe Manana <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
0 files changed, 0 insertions, 0 deletions