diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-06-12 12:58:34 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-06-26 06:07:09 -0700 |
commit | 00e120b5e4b5638cf19eee96d4332f2d100746ba (patch) | |
tree | 80c3f4c7402157468fc215ba70b6ca7d484a16ff /fs/f2fs/compress.c | |
parent | ccf3ff2b30edd52fb54e239da25758fb22acfb78 (diff) |
f2fs: assign default compression level
Let's avoid any confusion from assigning compress_level=0 for LZ4HC and ZSTD.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/compress.c')
-rw-r--r-- | fs/f2fs/compress.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 1132d3cd8f33..438af59d3571 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -317,8 +317,6 @@ static const struct f2fs_compress_ops f2fs_lz4_ops = { #endif #ifdef CONFIG_F2FS_FS_ZSTD -#define F2FS_ZSTD_DEFAULT_CLEVEL 1 - static int zstd_init_compress_ctx(struct compress_ctx *cc) { zstd_parameters params; @@ -327,6 +325,7 @@ static int zstd_init_compress_ctx(struct compress_ctx *cc) unsigned int workspace_size; unsigned char level = F2FS_I(cc->inode)->i_compress_level; + /* Need to remain this for backward compatibility */ if (!level) level = F2FS_ZSTD_DEFAULT_CLEVEL; |