Skip to content
Commit 8ede7312 authored by Chao Yu's avatar Chao Yu Committed by Sasha Levin
Browse files

f2fs: compress: fix to check zstd compress level correctly in mount option



[ Upstream commit e39602da ]

f2fs only support to config zstd compress level w/ a positive number due
to layout design, but since commit e0c1b49f ("lib: zstd: Upgrade to
latest upstream zstd version 1.4.10"), zstd supports negative compress
level, so that zstd_min_clevel() may return a negative number, then w/
below mount option, .compress_level can be configed w/ a negative number,
which is not allowed to f2fs, let's add check condition to avoid it.

mount -o compress_algorithm=zstd:4294967295 /dev/sdx /mnt/f2fs

Fixes: 00e120b5 ("f2fs: assign default compression level")
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 322eb43c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment