]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: optimize split page read in btrfs_get_token_##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)
commit875adf2b828d4297374ad7a1d47b230b27889f51
tree5d5f54bb5fa505011ff196dcf27432ddf98de456
parent2ecc6c3f023461ea1f851e2a022ac1b2f622b83f
btrfs: optimize split page read in btrfs_get_token_##bits

The fallback path calls helper read_extent_buffer 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. The cached
token address is set to the second page.

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