Skip to content

Commit 091a4df

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: compress: fix to assign compress_level for lz4 correctly
After remount, F2FS_OPTION().compress_level was assgin to LZ4HC_DEFAULT_CLEVEL incorrectly, result in lz4hc:9 was enabled, fix it. 1. mount /dev/vdb /dev/vdb on /mnt/f2fs type f2fs (...,compress_algorithm=lz4,compress_log_size=2,...) 2. mount -t f2fs -o remount,compress_log_size=3 /mnt/f2fs/ 3. mount|grep f2fs /dev/vdb on /mnt/f2fs type f2fs (...,compress_algorithm=lz4:9,compress_log_size=3,...) Fixes: 00e120b ("f2fs: assign default compression level") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 5118697 commit 091a4df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/f2fs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ static int f2fs_set_lz4hc_level(struct f2fs_sb_info *sbi, const char *str)
591591
unsigned int level;
592592

593593
if (strlen(str) == 3) {
594-
F2FS_OPTION(sbi).compress_level = LZ4HC_DEFAULT_CLEVEL;
594+
F2FS_OPTION(sbi).compress_level = 0;
595595
return 0;
596596
}
597597

0 commit comments

Comments
 (0)