aboutsummaryrefslogtreecommitdiff
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorFilipe Manana <[email protected]>2022-10-11 13:16:54 +0100
committerDavid Sterba <[email protected]>2022-12-05 18:00:38 +0100
commitd47704bd1c78c85831561bcf701b90dd66f811b2 (patch)
tree86015fb9158eaf12581d6c9829a0e255b4a562cf /rust/helpers.c
parent88074c8b1376ac315ef4a294db82d861df074ef2 (diff)
btrfs: get the next extent map during fiemap/lseek more efficiently
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 <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions