Since commit 29c1e18a0bc5 ("fsck.f2fs: tune linear_lookup in
f2fs_do_mount()"), fsck_update_sb_flags() writes the superblock directly
and nothing sets c.invalid_sb with SB_ENCODE_FLAG anymore. Drop the dead
flag and simplify the SB_NEED_FIX check.BTW, SB_ENCODE_FLAG should originally have been 0x10, not 0x16, since invalid_sb is a bitmask. Signed-off-by: Chunhai Guo <[email protected]> --- fsck/fsck.c | 2 +- include/f2fs_fs.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 4fca4dd7eb1b..85766118d04a 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -4001,7 +4001,7 @@ int fsck_verify(struct f2fs_sb_info *sbi) if (c.invalid_sb & SB_FS_ERRORS) memset(sb->s_errors, 0, MAX_F2FS_ERRORS); - if (c.invalid_sb & (SB_NEED_FIX | SB_ENCODE_FLAG)) + if (c.invalid_sb & SB_NEED_FIX) update_superblock(sb, SB_MASK_ALL); /* to return FSCK_ERROR_CORRECTED */ diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 21310fa6a1af..07772da6e67d 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -1477,9 +1477,8 @@ enum { #define SB_ABNORMAL_STOP 0x2 /* s_stop_reason is set except shutdown */ #define SB_FS_ERRORS 0x4 /* s_erros is set */ #define SB_INVALID 0x8 /* sb is invalid */ -#define SB_ENCODE_FLAG 0x16 /* encode_flag */ #define SB_NEED_FIX (SB_ABNORMAL_STOP | SB_FS_ERRORS | \ - SB_INVALID | SB_ENCODE_FLAG) + SB_INVALID) #define MAX_CACHE_SUMS 8 -- 2.34.1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
