diff options
author | David Sterba <dsterba@suse.com> | 2020-04-29 23:23:37 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 11:25:33 +0200 |
commit | 5cd17f343bd1c47dc673260fa2973abc14ecc549 (patch) | |
tree | 4dc319fad6bf754e73054a0fcd529d18ad203549 /fs/btrfs/tests | |
parent | btrfs: speed up btrfs_set_token_##bits helpers (diff) | |
download | linux-5cd17f343bd1c47dc673260fa2973abc14ecc549.tar.xz linux-5cd17f343bd1c47dc673260fa2973abc14ecc549.zip |
btrfs: speed up and simplify generic_bin_search
The bin search jumps over the extent buffer item keys, comparing
directly the bytes if the key is in one page, or storing it in a
temporary buffer in case it spans two pages.
The mapping start and length are obtained from map_private_extent_buffer,
which is heavy weight compared to what we need. We know the key size and
can find out the eb page in a simple way. For keys spanning two pages
the fallback read_extent_buffer is used.
The temporary variables are reduced and moved to the scope of use.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests')
0 files changed, 0 insertions, 0 deletions