diff mbox series

[f2fs-dev,2/4] f2fs: fix write pointers on zoned device after roll forward

Message ID 20231204180428.925779-2-jaegeuk@kernel.org (mailing list archive)
State Accepted
Commit 9dad4d964291295ef48243d4e03972b85138bc9f
Headers show
Series [f2fs-dev,1/4] f2fs: allocate new section if it's not new | expand

Commit Message

Jaegeuk Kim Dec. 4, 2023, 6:04 p.m. UTC
1. do roll forward recovery
2. update current segments pointers
3. fix the entire zones' write pointers
4. do checkpoint

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/recovery.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Daeho Jeong Dec. 4, 2023, 7:02 p.m. UTC | #1
LGTM

On Mon, Dec 4, 2023 at 10:06 AM Jaegeuk Kim <jaegeuk@kernel.org> wrote:
>
> 1. do roll forward recovery
> 2. update current segments pointers
> 3. fix the entire zones' write pointers
> 4. do checkpoint
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/recovery.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
> index 16415c770b45..d0f24ccbd1ac 100644
> --- a/fs/f2fs/recovery.c
> +++ b/fs/f2fs/recovery.c
> @@ -917,6 +917,8 @@ int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
>         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;
>         }
>
> --
> 2.43.0.rc2.451.g8631bc7472-goog
>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
diff mbox series

Patch

diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 16415c770b45..d0f24ccbd1ac 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -917,6 +917,8 @@  int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
 	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;
 	}