]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: move some zstd work data from stack to workspace
authorDavid Sterba <dsterba@suse.com>
Wed, 15 Nov 2017 17:27:39 +0000 (18:27 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:14 +0000 (16:08 +0100)
commit7d43863058b2072be72040359caf7f6ea75d1ea2
treebf541c68b1e5f2e7dee5c8cb4d0041c2de665af8
parent9ca3748c6013018e15500c06f5a8a5248c225fe7
btrfs: move some zstd work data from stack to workspace

* ZSTD_inBuffer in_buf
* ZSTD_outBuffer out_buf

are used in all functions to pass the compression parameters and the
local variables consume some space. We can move them to the workspace
and reduce the stack consumption:

zstd.c:zstd_decompress                        -24 (136 -> 112)
zstd.c:zstd_decompress_bio                    -24 (144 -> 120)
zstd.c:zstd_compress_pages                    -24 (264 -> 240)

Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Nick Terrell <terrelln@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zstd.c