Skip to contentSkip to conversation

f2fs: turn off one_time when forcibly set to foreground GC

PATCH Applied Daeho Jeong 2 participants 2 messages Jun 6, 2025 – Jun 24, 2025 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 f2fs: turn off one_time when forcibly set to foreground GC

From: Daeho Jeong <[email protected]>

one_time mode is only for background GC. So, we need to set it back to false when foreground GC is enforced.

Fixes 9748c2ddea4a ("f2fs: do FG_GC when GC boosting is required for zoned devices")

---
v2: move the position of Fixes.

---
 fs/f2fs/gc.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/gc.c +1 -0
index 2b8f9239bede..f752dec71e45 100644
@@ -1893,6 +1893,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control)
 	/* Let's run FG_GC, if we don't have enough space. */
 	if (has_not_enough_free_secs(sbi, 0, 0)) {
 		gc_type = FG_GC;
+		gc_control->one_time = false;
 
 		/*
 		 * For example, if there are many prefree_segments below given
Signature · 1 line
2.50.0.rc0.604.gd4ff7b7c86-goog
#1 lore raw
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 10 lines · On Fri, 6 Jun 2025 11:49:04 -0700 you wrote:

From: Daeho Jeong <[email protected]>

one_time mode is only for background GC. So, we need to set it back to false when foreground GC is enforced.

Fixes 9748c2ddea4a ("f2fs: do FG_GC when GC boosting is required for zoned devices")

[...]

Here is the summary with links:
- [f2fs-dev,v2] f2fs: turn off one_time when forcibly set to foreground GC

    https://git.kernel.org/jaegeuk/f2fs/c/8142daf8a538

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html