]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: optimize split page write in btrfs_set_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)
commitff31bd4d8e8aaf9db62f77f5cb9c7ffd5231ecbe
tree0670f22721df5ebe4b0e121f400386afb963e615
parent3f59687f9a144b84fb9c23a1a9c226632a212f24
btrfs: optimize split page write in btrfs_set_token_##bits

The fallback path calls helper write_extent_buffer to do write of the
data spanning two extent buffer pages. As the size is known, we can do
the write 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