diff options
author | Filipe Manana <fdmanana@suse.com> | 2022-10-11 13:16:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:38 +0100 |
commit | 013f9c70d293d7a47aaaeaee248ca60f745fa450 (patch) | |
tree | 85defd4da699c22295052d4b9c1ea21c34f0cbc8 /net/ipv4/inet_diag.c | |
parent | d47704bd1c78c85831561bcf701b90dd66f811b2 (diff) |
btrfs: skip unnecessary extent map searches during fiemap and lseek
If we have no outstanding extents it means we don't have any extent maps
corresponding to delalloc that is flushing, as when an ordered extent is
created we increment the number of outstanding extents to 1 and when we
remove the ordered extent we decrement them by 1. So skip extent map tree
searches if the number of outstanding ordered extents is 0, saving time as
the tree is not empty if we have previously made some reads or flushed
delalloc, as in those cases it can have a very large number of extent maps
for files with many extents.
This helps save time when processing a file range corresponding to a hole
or prealloc (unwritten) extent.
The next patch in the series has a performance test in its changelog and
its subject is:
"btrfs: skip unnecessary delalloc search during fiemap and lseek"
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'net/ipv4/inet_diag.c')
0 files changed, 0 insertions, 0 deletions