diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-05-09 15:01:04 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-05-11 20:36:47 -0700 |
commit | f6644143c63f2eac88973f7fea087582579b0189 (patch) | |
tree | defbd1a327fca5d4a28b0f98f0074b823e43be58 /fs/mount.h | |
parent | 1f5f11a3c41e2b23288b2769435a00f74e02496b (diff) | |
download | linux-f6644143c63f2eac88973f7fea087582579b0189.tar.bz2 |
f2fs: compress: let lz4 compressor handle output buffer budget properly
Commonly, in order to handle lz4 worst compress case, caller should
allocate buffer with size of LZ4_compressBound(inputsize) for target
compressed data storing, however in this case, if caller didn't
allocate enough space, lz4 compressor still can handle output buffer
budget properly, and end up compressing when left space in output
buffer is not enough.
So we don't have to allocate buffer with size for worst case, then
we can avoid 2 * 4KB size intermediate buffer allocation when
log_cluster_size is 2, and avoid unnecessary compressing work of
compressor if we can not save at least 4KB space.
Suggested-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/mount.h')
0 files changed, 0 insertions, 0 deletions