aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/lzo.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-09-27 15:22:03 +0800
committerDavid Sterba <dsterba@suse.com>2021-10-26 19:08:05 +0200
commit2b83a0eea5a15d2651953a8cbb1afd0608b6e588 (patch)
tree945333b6240b7187c90b7dabbdfbfd103a7b3b1c /fs/btrfs/lzo.c
parent66448b9d5b6840c230d81cbf10d6ffaeece2d71b (diff)
btrfs: factor uncompressed async extent submission code into a new helper
Introduce a new helper, submit_uncompressed_range(), for async cow cases where we fallback to COW. There are some new updates introduced to the helper: - Proper locked_page detection It's possible that the async_extent range doesn't cover the locked page. In that case we shouldn't unlock the locked page. In the new helper, we will ensure that we only unlock the locked page when: * The locked page covers part of the async_extent range * The locked page is not unlocked by cow_file_range() nor extent_write_locked_range() This also means extra comments are added focusing on the page locking. - Add extra comment on some rare parameter used. We use @unlock_page = 0 for cow_file_range(), where only two call sites doing the same thing, including the new helper. It's definitely worth some comments. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/lzo.c')
0 files changed, 0 insertions, 0 deletions