aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2024-02-17 06:29:49 +0000
committerDavid Sterba <[email protected]>2024-03-05 16:13:23 +0000
commit8e7e9c672fd810a099dc2ac92a80e8e95cd5b0dc (patch)
tree60a6f6d218ebc78fea0016aae795d72bffb40bbc /fs/btrfs/compression.c
parentbtrfs: unexport btrfs_subpage_start_writer() and btrfs_subpage_end_and_test_w... (diff)
downloadkernel-8e7e9c672fd810a099dc2ac92a80e8e95cd5b0dc.tar.gz
kernel-8e7e9c672fd810a099dc2ac92a80e8e95cd5b0dc.zip
btrfs: subpage: make reader lock utilize bitmap
Currently btrfs_subpage utilizes its atomic member @reader to manage the reader counter. However it is only utilized to prevent the page to be released/unlocked when we still have reads underway. In that use case, we don't really allow multiple readers on the same subpage sector. So here we can introduce a new locked bitmap to represent exactly which subpage range is locked for read. In theory we can remove btrfs_subpage::reader as it's just the set bits of the new locked bitmap. But unfortunately bitmap doesn't provide such handy API yet, so we still keep the reader counter. 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/compression.c')
0 files changed, 0 insertions, 0 deletions