linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [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

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).