[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf3f571c-a6bf-4a17-8745-039b37ac4f48@kernel.org>
Date: Thu, 27 Mar 2025 14:02:03 +0800
From: Chao Yu <chao@...nel.org>
To: Yohan Joung <jyh429@...il.com>, jaegeuk@...nel.org, daeho43@...il.com
Cc: chao@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Yohan Joung <yohan.joung@...com>
Subject: Re: [PATCH] f2fs: prevent the current section from being selected as
a victim during garbage collection
On 3/26/25 22:14, Yohan Joung wrote:
> When selecting a victim using next_victim_seg in a large section, the
> selected section might already have been cleared and designated as the
> new current section, making it actively in use.
> This behavior causes inconsistency between the SIT and SSA.
Hi, does this fix your issue?
https://lore.kernel.org/linux-f2fs-devel/20250325080646.3291947-2-chao@kernel.org
Thanks,
>
> Signed-off-by: Yohan Joung <yohan.joung@...com>
> ---
> fs/f2fs/gc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 2b8f9239bede..4b5d18e395eb 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -1926,6 +1926,10 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control)
> goto stop;
> }
>
> + if (__is_large_section(sbi) &&
> + IS_CURSEC(sbi, GET_SEC_FROM_SEG(sbi, segno)))
> + goto stop;
> +
> seg_freed = do_garbage_collect(sbi, segno, &gc_list, gc_type,
> gc_control->should_migrate_blocks,
> gc_control->one_time);
Powered by blists - more mailing lists