third_party_f2fs-tools/fsck
Juhyung Park 7a64f18f69 fsck.f2fs: fix sanity check logic for cp_payload
cp_payload is set differently [1] when extended node bitmap feature is
enabled. Commit b79c3ba4ea broke fsck on f2fs file systems created on
2+ TB device with extended node bitmap feature enabled.

As the sanity check is for checking overflows, fix this to assume the max
possible cp_payload size under the extended node bitmap.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/tree/mkfs/f2fs_format.c?h=v1.15.0#n372 [1]
Fixes: b79c3ba4ea ("fsck.f2fs: sanity check cp_payload before reading checkpoint")
Reported-by: Alexander Koskovich <akoskovich@pm.me>
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-15 11:31:47 +08:00
..
BUILD.gn f2fs_do_mount-dfx 2024-03-21 10:39:24 +08:00
common.h fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
compress.c f2fs-tools: fix build error on lz4-1.9.4 2024-04-15 11:31:46 +08:00
compress.h f2fs-tools:sload.f2fs compression support 2023-04-13 14:13:44 +08:00
defrag.c f2fs-tool: increase debug level from 0 to 1 in migrate_block 2023-04-13 14:13:44 +08:00
dict.c Remove unnecessary config.h 2024-04-15 11:29:16 +08:00
dict.h fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
dir.c Fix the MinGW build 2023-04-13 14:13:49 +08:00
dqblk_v2.h fsck.f2fs: support quota 2017-11-06 20:07:40 -08:00
dump.c dump.f2fs: add -I nid to dump inode by scan full disk 2024-04-15 11:29:16 +08:00
f2fs.h f2fs-tools: fix # of total segments 2024-04-15 11:31:46 +08:00
fsck.c fsck.f2fs: don't call report_zone on normal partition 2024-04-15 11:31:46 +08:00
fsck.h fsck.f2fs: add parentheses for SB_MASK 2024-04-15 11:31:46 +08:00
main.c dump.f2fs: remove unavailable option -g 2024-04-15 11:31:46 +08:00
Makefile.am Fix the MinGW build 2023-04-13 14:13:49 +08:00
mkquota.c Remove unnecessary config.h 2024-04-15 11:29:16 +08:00
mount.c fsck.f2fs: fix sanity check logic for cp_payload 2024-04-15 11:31:47 +08:00
node.c f2fs-tools: rebuild the quota inode if it is corrupted 2023-04-13 14:13:46 +08:00
node.h f2fs-tools: set cold flag for non-dir node 2020-06-18 12:38:18 -07:00
quotaio_tree.c Remove unnecessary config.h 2024-04-15 11:29:16 +08:00
quotaio_tree.h Remove unnecessary __attribute__((packed)) annotations 2023-04-13 14:13:49 +08:00
quotaio_v2.c Remove unnecessary config.h 2024-04-15 11:29:16 +08:00
quotaio_v2.h Remove unnecessary __attribute__((packed)) annotations 2023-04-13 14:13:49 +08:00
quotaio.c Remove unnecessary config.h 2024-04-15 11:29:16 +08:00
quotaio.h Fix the MinGW build 2023-04-13 14:13:49 +08:00
resize.c f2fs-tools: fix # of total segments 2024-04-15 11:31:46 +08:00
segment.c mkfs.f2fs: update allocation policy for ro feature 2024-04-15 11:31:46 +08:00
sload.c Fix format strings in log messages 2024-04-15 11:31:46 +08:00
xattr.c f2fs-tools: use F2FS_BLKSIZE instead of PAGE_*_SIZE 2024-04-15 11:31:46 +08:00
xattr.h f2fs-tools: use F2FS_BLKSIZE instead of PAGE_*_SIZE 2024-04-15 11:31:46 +08:00