]> git.ipfire.org Git - thirdparty/linux.git/commit
f2fs: ensure minimum trim granularity accounts for all devices
authorYongpeng Yang <yangyongpeng@xiaomi.com>
Fri, 24 Oct 2025 14:37:46 +0000 (22:37 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 4 Dec 2025 02:00:03 +0000 (02:00 +0000)
commitd8bdf7856e17b31263bcd37d60903ee36bd2f857
tree4bcc2242d9202c5162dca556372a2c1a20a3eeca
parent392711ef18bff524a873b9c239a73148c5432262
f2fs: ensure minimum trim granularity accounts for all devices

When F2FS uses multiple block devices, each device may have a
different discard granularity. The minimum trim granularity must be
at least the maximum discard granularity of all devices, excluding
zoned devices. Use max_t instead of the max() macro to compute the
maximum value.

Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c