It missed to set compact summary's footer correctly, fix it.
There is no consistent issue, as initial entry_type in footer is zero
that the value is equal to SUM_TYPE_DATA we will fix to update to.
Fixes: 724ca0883658 ("mkfs.f2fs: refactor format flow for cleanup")
Signed-off-by: Chao Yu <[email protected]>
---
mkfs/f2fs_format.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index c28ebb0..2680bd3 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -1012,10 +1012,9 @@ static int f2fs_write_check_point_pack(void)
memcpy(sum_compact_p, &journal->n_sits, SUM_JOURNAL_SIZE);
sum_compact_p += SUM_JOURNAL_SIZE;
- /* hot data summary */
- memset(sum, 0, F2FS_BLKSIZE);
- SET_SUM_TYPE(sum, SUM_TYPE_DATA);
+ SET_SUM_TYPE((struct f2fs_summary_block *)sum_compact, SUM_TYPE_DATA);
+ /* hot data summary */
sum_entry = (struct f2fs_summary *)sum_compact_p;
memcpy(sum_entry, c.sum[CURSEG_HOT_DATA],
sizeof(struct f2fs_summary) * MAX_CACHE_SUMS);
--
2.48.1
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel