[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240205031415.557879-1-bo.wu@vivo.com>
Date: Sun, 4 Feb 2024 20:14:15 -0700
From: Wu Bo <bo.wu@...o.com>
To: Jaegeuk Kim <jaegeuk@...nel.org>,
Chao Yu <chao@...nel.org>
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org,
Wu Bo <wubo.oduw@...il.com>,
Wu Bo <bo.wu@...o.com>,
stable@...r.kernel.org
Subject: [PATCH] Revert "f2fs: stop allocating pinned sections if EAGAIN happens"
This reverts commit 2e42b7f817acd6e8d78226445eb6fe44fe79c12a.
If the GC victim section has a pinned block when fallocate() trigger
FG_GC, the section is not able to be recycled. And this will return
-EAGAIN cause fallocate() failed, even though there are much spare space
as user see. As the GC policy prone to chose the same victim,
fallocate() may not successed at a long period.
This scenario has been found during Android OTA.
Link: https://lore.kernel.org/linux-f2fs-devel/20231030094024.263707-1-bo.wu@vivo.com/t/#u
CC: stable@...r.kernel.org
Signed-off-by: Wu Bo <bo.wu@...o.com>
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index b58ab1157b7e..19915faccee9 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1725,7 +1725,7 @@ static int f2fs_expand_inode_data(struct inode *inode, loff_t offset,
f2fs_down_write(&sbi->gc_lock);
stat_inc_gc_call_count(sbi, FOREGROUND);
err = f2fs_gc(sbi, &gc_control);
- if (err && err != -ENODATA)
+ if (err && err != -ENODATA && err != -EAGAIN)
goto out_err;
}
--
2.25.1
Powered by blists - more mailing lists