* [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix @ 2018-01-20 22:06 Jaegeuk Kim 2018-01-20 22:06 ` [PATCH 2/2] fsck.f2fs: show missing checkpoint flags Jaegeuk Kim 2018-01-21 2:42 ` [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix Chao Yu 0 siblings, 2 replies; 4+ messages in thread From: Jaegeuk Kim @ 2018-01-20 22:06 UTC (permalink / raw) To: linux-f2fs-devel; +Cc: Jaegeuk Kim This allows roll-forward when fsck.f2fs changes checkpoint crc. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- fsck/fsck.c | 1 + include/f2fs_fs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fsck/fsck.c b/fsck/fsck.c index 1211729..6c1b9a7 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -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)); diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 4739085..67f31d8 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -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 -- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] fsck.f2fs: show missing checkpoint flags 2018-01-20 22:06 [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix Jaegeuk Kim @ 2018-01-20 22:06 ` Jaegeuk Kim 2018-01-21 2:43 ` Chao Yu 2018-01-21 2:42 ` [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix Chao Yu 1 sibling, 1 reply; 4+ messages in thread From: Jaegeuk Kim @ 2018-01-20 22:06 UTC (permalink / raw) To: linux-f2fs-devel; +Cc: Jaegeuk Kim This patch shows some missing checkpoint flags. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- fsck/mount.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/fsck/mount.c b/fsck/mount.c index 124593d..0a5b986 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -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 -- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] fsck.f2fs: show missing checkpoint flags 2018-01-20 22:06 ` [PATCH 2/2] fsck.f2fs: show missing checkpoint flags Jaegeuk Kim @ 2018-01-21 2:43 ` Chao Yu 0 siblings, 0 replies; 4+ messages in thread From: Chao Yu @ 2018-01-21 2:43 UTC (permalink / raw) To: Jaegeuk Kim, linux-f2fs-devel On 2018/1/21 6:06, Jaegeuk Kim wrote: > This patch shows some missing checkpoint flags. > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Thanks, ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix 2018-01-20 22:06 [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix Jaegeuk Kim 2018-01-20 22:06 ` [PATCH 2/2] fsck.f2fs: show missing checkpoint flags Jaegeuk Kim @ 2018-01-21 2:42 ` Chao Yu 1 sibling, 0 replies; 4+ messages in thread From: Chao Yu @ 2018-01-21 2:42 UTC (permalink / raw) To: Jaegeuk Kim, linux-f2fs-devel On 2018/1/21 6:06, Jaegeuk Kim wrote: > This allows roll-forward when fsck.f2fs changes checkpoint crc. > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Thanks, ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-21 2:43 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-01-20 22:06 [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix Jaegeuk Kim 2018-01-20 22:06 ` [PATCH 2/2] fsck.f2fs: show missing checkpoint flags Jaegeuk Kim 2018-01-21 2:43 ` Chao Yu 2018-01-21 2:42 ` [PATCH 1/2] fsck.f2fs: allow roll-forward for small checkpoint fix Chao Yu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).