linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsck.f2fs: fix to set CP_LARGE_NAT_BITMAP_FLAG
@ 2019-04-18  7:49 Chao Yu
  2019-04-18 13:14 ` Ju Hyung Park
  0 siblings, 1 reply; 5+ messages in thread
From: Chao Yu @ 2019-04-18  7:49 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: jaegeuk

During fixing checkpoint, if large_nat_bitmap feature is on, we need to
set CP_LARGE_NAT_BITMAP_FLAG flag in checkpoint.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fsck/fsck.c  | 2 ++
 fsck/mount.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/fsck/fsck.c b/fsck/fsck.c
index a17555c..88ed4d7 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -2038,6 +2038,8 @@ static void fix_checkpoint(struct f2fs_sb_info *sbi)
 		flags |= CP_TRIMMED_FLAG;
 	if (is_set_ckpt_flags(cp, CP_DISABLED_FLAG))
 		flags |= CP_DISABLED_FLAG;
+	if (is_set_ckpt_flags(cp, CP_LARGE_NAT_BITMAP_FLAG))
+		flags |= CP_LARGE_NAT_BITMAP_FLAG;
 
 	if (flags & CP_UMOUNT_FLAG)
 		cp_blocks = 8;
diff --git a/fsck/mount.c b/fsck/mount.c
index aa64e93..20ecf07 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -2365,6 +2365,8 @@ void write_checkpoint(struct f2fs_sb_info *sbi)
 		flags |= CP_TRIMMED_FLAG;
 	if (is_set_ckpt_flags(cp, CP_DISABLED_FLAG))
 		flags |= CP_DISABLED_FLAG;
+	if (is_set_ckpt_flags(cp, CP_LARGE_NAT_BITMAP_FLAG))
+		flags |= CP_LARGE_NAT_BITMAP_FLAG;
 
 	set_cp(free_segment_count, get_free_segments(sbi));
 	set_cp(valid_block_count, sbi->total_valid_block_count);
-- 
2.18.0.rc1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-19  4:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-18  7:49 [PATCH] fsck.f2fs: fix to set CP_LARGE_NAT_BITMAP_FLAG Chao Yu
2019-04-18 13:14 ` Ju Hyung Park
2019-04-19  3:45   ` Chao Yu
2019-04-19  4:36     ` Ju Hyung Park
2019-04-19  4:59       ` 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).