Commit f2526c5c authored by Daeho Jeong's avatar Daeho Jeong Committed by Jaegeuk Kim

f2fs: allow dirty sections with zero valid block for checkpoint disabled

Following the semantic for dirty segments in checkpoint disabled mode,
apply the same rule to dirty sections.
Signed-off-by: default avatarDaeho Jeong <daehojeong@google.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 29ed2b5d
......@@ -771,8 +771,10 @@ static void __locate_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno,
block_t valid_blocks =
get_valid_blocks(sbi, segno, true);
f2fs_bug_on(sbi, unlikely(!valid_blocks ||
valid_blocks == CAP_BLKS_PER_SEC(sbi)));
f2fs_bug_on(sbi,
(!is_sbi_flag_set(sbi, SBI_CP_DISABLED) &&
!valid_blocks) ||
valid_blocks == CAP_BLKS_PER_SEC(sbi));
if (!IS_CURSEC(sbi, secno))
set_bit(secno, dirty_i->dirty_secmap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment