]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: pass a pointer to get_range_bits() to cache first search result
authorFilipe Manana <fdmanana@suse.com>
Tue, 25 Mar 2025 17:26:37 +0000 (17:26 +0000)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:40 +0000 (14:30 +0200)
commitc4669e4a8b660143ad1fc9743dcb2a3d81a74b42
tree4881c2c3dfe646b92b7b2fa2b110fda733612c36
parent32c523c578e8489f55663ce8a8860079c8deb414
btrfs: pass a pointer to get_range_bits() to cache first search result

Allow get_range_bits() to take an extent state pointer to pointer argument
so that we can cache the first extent state record in the target range, so
that a caller can use it for subsequent operations without doing a full
tree search. Currently the only user is try_release_extent_state(), which
then does a call to __clear_extent_bit() which can use such a cached state
record.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-io-tree.c
fs/btrfs/extent-io-tree.h
fs/btrfs/extent_io.c