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