]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
f2fs: turn off one_time when forcibly set to foreground GC
authorDaeho Jeong <daehojeong@google.com>
Fri, 6 Jun 2025 18:49:04 +0000 (11:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 14:39:17 +0000 (16:39 +0200)
[ Upstream commit 8142daf8a53806689186ee255cc02f89af7f8890 ]

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")
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/gc.c

index 3cb5242f4ddfe9eb6a6e81e74aaefe95589a4e8a..d915b54392b8540286c5ef64a0f93ada73778756 100644 (file)
@@ -1891,6 +1891,7 @@ gc_more:
        /* 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