aboutsummaryrefslogtreecommitdiff
path: root/include/linux/asn1_encoder.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2024-08-13 13:36:40 +0200
committerDavid Sterba <dsterba@suse.com>2024-09-10 16:51:18 +0200
commit0ae653fbec2b9fbc72c65a0c99528990bfb2136d (patch)
tree30caf7c7d1bd5567f80636972bd551903bd9b797 /include/linux/asn1_encoder.h
parent6d752cacae5eb8590c98866effaebf67410a9136 (diff)
btrfs: reduce chunk_map lookups in btrfs_map_block()
Currently we're calling btrfs_num_copies() before btrfs_get_chunk_map() in btrfs_map_block(). But btrfs_num_copies() itself does a chunk map lookup to be able to calculate the number of copies. So split out the code getting the number of copies from btrfs_num_copies() into a helper called btrfs_chunk_map_num_copies() and directly call it from btrfs_map_block() and btrfs_num_copies(). This saves us one rbtree lookup per btrfs_map_block() invocation. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/asn1_encoder.h')
0 files changed, 0 insertions, 0 deletions