]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: optimize split page read in btrfs_get_##bits
authorDavid Sterba <dsterba@suse.com>
Thu, 30 Apr 2020 15:57:55 +0000 (17:57 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:34 +0000 (11:25 +0200)
commit4ffd7baf4b9da57bdb1381893f5fc8da428bf21c
tree9afe4d666d6c5c7ce55f2b07602f514a38866f9b
parentbdc94a702055ec7be60baa8ba7be3432d277483c
btrfs: optimize split page read in btrfs_get_##bits

The helper read_extent_buffer is called to do read of the data spanning
two extent buffer pages. As the size is known, we can do the read
directly in two steps.  This removes one function call and compiler can
optimize memcpy as the sizes are known at compile time.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/struct-funcs.c