linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] sload.f2fs: update sit entries of cursegs
@ 2018-06-13  1:51 Sheng Yong
  2018-06-13  1:51 ` [RFC PATCH 2/2] fsck.f2fs: introduce fsck_chk_curseg_info Sheng Yong
  2018-06-19 12:07 ` [PATCH 1/2] sload.f2fs: update sit entries of cursegs Chao Yu
  0 siblings, 2 replies; 8+ messages in thread
From: Sheng Yong @ 2018-06-13  1:51 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: miaoxie, linux-f2fs-devel

move_curseg_info->reset_curseg changes cursegs, however, new segment
entries are not set as dirty. As a result, flush_sit_entries will not
update entries in SIT, especially when an empty segment is selected
as the new curseg, its seg_entry->type is lost.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
 fsck/mount.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fsck/mount.c b/fsck/mount.c
index 0a30adb..68278c5 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -1149,6 +1149,7 @@ void reset_curseg(struct f2fs_sb_info *sbi, int type)
 		SET_SUM_TYPE(sum_footer, SUM_TYPE_NODE);
 	se = get_seg_entry(sbi, curseg->segno);
 	se->type = type;
+	se->dirty = 1;
 }
 
 static void read_compacted_summaries(struct f2fs_sb_info *sbi)
-- 
2.17.1


------------------------------------------------------------------------------
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] 8+ messages in thread

end of thread, other threads:[~2018-06-21  6:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-13  1:51 [PATCH 1/2] sload.f2fs: update sit entries of cursegs Sheng Yong
2018-06-13  1:51 ` [RFC PATCH 2/2] fsck.f2fs: introduce fsck_chk_curseg_info Sheng Yong
2018-06-13 10:13   ` [PATCH] f2fs-tools: do not count free_segs in flush_sit_entries Sheng Yong
2018-06-19 12:12     ` Chao Yu
2018-06-19 12:11   ` [RFC PATCH 2/2] fsck.f2fs: introduce fsck_chk_curseg_info Chao Yu
2018-06-20 11:12     ` [PATCH v2] " Sheng Yong
2018-06-21  6:12       ` Chao Yu
2018-06-19 12:07 ` [PATCH 1/2] sload.f2fs: update sit entries of cursegs 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).