fsck.f2fs: allow roll-forward for small checkpoint fix
PATCH 1/2 fsck.f2fs: allow roll-forward for small checkpoint fix
This allows roll-forward when fsck.f2fs changes checkpoint crc.
--- fsck/fsck.c | 1 + include/f2fs_fs.h | 1 + 2 files changed, 2 insertions(+)
fsck/fsck.c +1 -0
@@ -1936,6 +1936,7 @@ static void fix_checkpoint(struct f2fs_sb_info *sbi)set_cp (cp_pack_total_block_count,8 + orphan_blks +get_sb (cp_payload)); flags =update_nat_bits_flags (sb, cp, flags); + flags |=CP_NOCRC_RECOVERY_FLAG ;set_cp (ckpt_flags, flags);set_cp (free_segment_count,get_free_segments (sbi));
include/f2fs_fs.h +1 -0
@@ -613,6 +613,7 @@ struct f2fs_super_block {/* * For checkpoint */ +#define CP_NOCRC_RECOVERY_FLAG 0x00000200#define CP_TRIMMED_FLAG 0x00000100#define CP_NAT_BITS_FLAG 0x00000080#define CP_CRC_RECOVERY_FLAG 0x00000040
Signature · 6 lines
2.15.0.531.g2ccb3012c9-goog ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
PATCH 2/2 fsck.f2fs: show missing checkpoint flags
This patch shows some missing checkpoint flags.
--- fsck/mount.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
fsck/mount.c +10 -6
@@ -401,6 +401,16 @@ void print_ckpt_info(struct f2fs_sb_info *sbi)void print_cp_state (u32 flag) {MSG (0 ,"Info: checkpoint state = %x : " , flag); +if (flag &CP_NOCRC_RECOVERY_FLAG ) +MSG (0 ,"%s" ," allow_nocrc" ); +if (flag &CP_TRIMMED_FLAG ) +MSG (0 ,"%s" ," trimmed" ); +if (flag &CP_NAT_BITS_FLAG ) +MSG (0 ,"%s" ," nat_bits" ); +if (flag &CP_CRC_RECOVERY_FLAG ) +MSG (0 ,"%s" ," crc" ); +if (flag &CP_FASTBOOT_FLAG ) +MSG (0 ,"%s" ," fastboot" );if (flag &CP_FSCK_FLAG )MSG (0 ,"%s" ," fsck" );if (flag &CP_ERROR_FLAG )
@@ -409,12 +419,6 @@ void print_cp_state(u32 flag)MSG (0 ,"%s" ," compacted_summary" );if (flag &CP_ORPHAN_PRESENT_FLAG )MSG (0 ,"%s" ," orphan_inodes" ); -if (flag &CP_FASTBOOT_FLAG ) -MSG (0 ,"%s" ," fastboot" ); -if (flag &CP_NAT_BITS_FLAG ) -MSG (0 ,"%s" ," nat_bits" ); -if (flag &CP_TRIMMED_FLAG ) -MSG (0 ,"%s" ," trimmed" );if (flag &CP_UMOUNT_FLAG )MSG (0 ,"%s" ," unmount" );else
Signature · 6 lines
2.15.0.531.g2ccb3012c9-goog ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Re: [PATCH 2/2] fsck.f2fs: show missing checkpoint flags
Quoted 3 lines · Jaegeuk Kim
This patch shows some missing checkpoint flags.
Signed-off-by Jaegeuk Kim <[email protected]>
Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 3 lines · Jaegeuk Kim
This allows roll-forward when fsck.f2fs changes checkpoint crc.
Signed-off-by Jaegeuk Kim <[email protected]>
Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot