resize.f2fs: clear CP_COMPACT_SUM_FLAG when rebuilding checkpoint
authorSheng Yong <shengyong1@huawei.com>
Sun, 8 Apr 2018 02:14:29 +0000 (10:14 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 14 Jul 2018 05:46:00 +0000 (22:46 -0700)
Resize rebuilds checkpoint with 6 summary blocks, so if
CP_COMPACT_SUM_FLAG is set in the old checkpoint, clear it.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/resize.c

index b2adf3e..9d79e6b 100644 (file)
@@ -507,6 +507,8 @@ static void rebuild_checkpoint(struct f2fs_sb_info *sbi,
 
        /* update nat_bits flag */
        flags = update_nat_bits_flags(new_sb, cp, get_cp(ckpt_flags));
+       if (flags & CP_COMPACT_SUM_FLAG)
+               flags &= ~CP_COMPACT_SUM_FLAG;
        set_cp(ckpt_flags, flags);
 
        memcpy(new_cp, cp, (unsigned char *)cp->sit_nat_version_bitmap -