linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: retry to update the inode page given EIO
@ 2023-01-05 23:39 Jaegeuk Kim
  2023-01-11  1:20 ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
  0 siblings, 1 reply; 11+ messages in thread
From: Jaegeuk Kim @ 2023-01-05 23:39 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim, stable

In f2fs_update_inode_page, f2fs_get_node_page handles EIO along with
f2fs_handle_page_eio that stops checkpoint, if the disk couldn't be recovered.
As a result, we don't need to stop checkpoint right away given single EIO.

Cc: stable@vger.kernel.org
Signed-off-by: Randall Huang <huangrandall@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 01b9e6f85f6b..66e407fcefd3 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -719,10 +719,10 @@ void f2fs_update_inode_page(struct inode *inode)
 	if (IS_ERR(node_page)) {
 		int err = PTR_ERR(node_page);
 
-		if (err == -ENOMEM) {
+		if (err == -ENOMEM || err == -EIO) {
 			cond_resched();
 			goto retry;
-		} else if (err != -ENOENT) {
+		} else if (err != -ENOENT || f2fs_cp_error(sbi)) {
 			f2fs_stop_checkpoint(sbi, false,
 					STOP_CP_REASON_UPDATE_INODE);
 		}
-- 
2.39.0.314.g84b9a713c41-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-01-31  3:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-05 23:39 [f2fs-dev] [PATCH] f2fs: retry to update the inode page given EIO Jaegeuk Kim
2023-01-11  1:20 ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
2023-01-11 12:57   ` Chao Yu
2023-01-11 18:50     ` Jaegeuk Kim
2023-01-12 10:14       ` Chao Yu
2023-01-13  0:01         ` Jaegeuk Kim
2023-01-28  3:11           ` Chao Yu
2023-01-30 23:30             ` Jaegeuk Kim
2023-01-11 18:54   ` [f2fs-dev] [PATCH v3] " Jaegeuk Kim
2023-01-30 23:30   ` Jaegeuk Kim
2023-01-31  3:40     ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).