Skip to contentSkip to conversation

resize.f2fs: clear CP_COMPACT_SUM_FLAG when rebuilding checkpoint

PATCH In review Sheng Yong 2 participants 2 messages Apr 8, 2018

lore
Share & tools
lore

Sheng Yong

author
#0 lore raw

PATCH 1/1 resize.f2fs: clear CP_COMPACT_SUM_FLAG when rebuilding checkpoint

Resize rebuilds checkpoint with 6 summary blocks, so if CP_COMPACT_SUM_FLAG is set in the old checkpoint, clear it.

---
 fsck/resize.c | 2 ++
 1 file changed, 2 insertions(+)
fsck/resize.c +2 -0
index 7643511..019da71 100644
@@ -504,6 +504,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 -
Signature · 6 lines
2.14.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Sheng Yong

Resize rebuilds checkpoint with 6 summary blocks, so if CP_COMPACT_SUM_FLAG is set in the old checkpoint, clear it.

Thanks,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot