sload.f2fs: update sit entries of cursegs
authorSheng Yong <shengyong1@huawei.com>
Wed, 13 Jun 2018 01:51:49 +0000 (09:51 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 28 Aug 2018 06:49:26 +0000 (23:49 -0700)
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>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/mount.c

index 0afed74..1054ad0 100644 (file)
@@ -1229,6 +1229,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)