diff options
author | Filipe Manana <fdmanana@suse.com> | 2022-10-11 15:16:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-26 15:28:38 +0300 |
commit | e19ebc5f9a711fb97835068660fd0bc43aad0f92 (patch) | |
tree | 2cfd33f45ea988801d0250d77c3e88e7340c4ced /rust/kernel | |
parent | b28def6ed97045b2f6606940cb3d575b52aea76c (diff) | |
download | linux-e19ebc5f9a711fb97835068660fd0bc43aad0f92.tar.xz |
btrfs: get the next extent map during fiemap/lseek more efficiently
commit d47704bd1c78c85831561bcf701b90dd66f811b2 upstream.
At find_delalloc_subrange(), when we need to get the next extent map, we
do a full search on the extent map tree (a red black tree). This is fine
but it's a lot more efficient to simply use rb_next(), which typically
requires iterating over less nodes of the tree and never needs to compare
the ranges of nodes with the one we are looking for.
So add a public helper to extent_map.{h,c} to get the extent map that
immediately follows another extent map, using rb_next(), and use that
helper at find_delalloc_subrange().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions