From: Jaegeuk Kim Date: Sat, 2 Dec 2023 08:08:57 +0000 (-0800) Subject: f2fs: fix write pointers on zoned device after roll forward X-Git-Tag: v6.6.17~287 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b981e78d0334fe2f38c5bf9e239767a68fb876c;p=platform%2Fkernel%2Flinux-starfive.git f2fs: fix write pointers on zoned device after roll forward [ Upstream commit 9dad4d964291295ef48243d4e03972b85138bc9f ] 1. do roll forward recovery 2. update current segments pointers 3. fix the entire zones' write pointers 4. do checkpoint Reviewed-by: Daeho Jeong Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index f0de36ef73c2..c8ba9f1551b6 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -917,6 +917,8 @@ skip: if (!err && fix_curseg_write_pointer && !f2fs_readonly(sbi->sb) && f2fs_sb_has_blkzoned(sbi)) { err = f2fs_fix_curseg_write_pointer(sbi); + if (!err) + err = f2fs_check_write_pointer(sbi); ret = err; }