All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix error handling of __get_node_page
@ 2023-10-18  6:51 ` Zhiguo Niu
  0 siblings, 0 replies; 4+ messages in thread
From: Zhiguo Niu @ 2023-10-18  6:51 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, niuzhiguo84, zhiguo.niu

Use f2fs_handle_error to record inconsistent node block error
and return -EFSCORRUPTED instead of -EINVAL.

Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
---
 fs/f2fs/node.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 248764b..ed963c56 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1467,7 +1467,8 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid,
 			  ofs_of_node(page), cpver_of_node(page),
 			  next_blkaddr_of_node(page));
 	set_sbi_flag(sbi, SBI_NEED_FSCK);
-	err = -EINVAL;
+	f2fs_handle_error(sbi, ERROR_INCONSISTENT_FOOTER);
+	err = -EFSCORRUPTED;
 out_err:
 	ClearPageUptodate(page);
 out_put_err:
-- 
1.9.1


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

* [f2fs-dev] [PATCH] f2fs: fix error handling of __get_node_page
@ 2023-10-18  6:51 ` Zhiguo Niu
  0 siblings, 0 replies; 4+ messages in thread
From: Zhiguo Niu @ 2023-10-18  6:51 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: zhiguo.niu, niuzhiguo84, linux-kernel, linux-f2fs-devel

Use f2fs_handle_error to record inconsistent node block error
and return -EFSCORRUPTED instead of -EINVAL.

Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
---
 fs/f2fs/node.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 248764b..ed963c56 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1467,7 +1467,8 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid,
 			  ofs_of_node(page), cpver_of_node(page),
 			  next_blkaddr_of_node(page));
 	set_sbi_flag(sbi, SBI_NEED_FSCK);
-	err = -EINVAL;
+	f2fs_handle_error(sbi, ERROR_INCONSISTENT_FOOTER);
+	err = -EFSCORRUPTED;
 out_err:
 	ClearPageUptodate(page);
 out_put_err:
-- 
1.9.1



_______________________________________________
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] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: fix error handling of __get_node_page
  2023-10-18  6:51 ` [f2fs-dev] " Zhiguo Niu
@ 2023-10-23 15:30   ` patchwork-bot+f2fs
  -1 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+f2fs @ 2023-10-23 15:30 UTC (permalink / raw)
  To: Zhiguo Niu; +Cc: jaegeuk, chao, niuzhiguo84, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed, 18 Oct 2023 14:51:02 +0800 you wrote:
> Use f2fs_handle_error to record inconsistent node block error
> and return -EFSCORRUPTED instead of -EINVAL.
> 
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
>  fs/f2fs/node.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [f2fs-dev] f2fs: fix error handling of __get_node_page
    https://git.kernel.org/jaegeuk/f2fs/c/9b4c8dd99fe4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [f2fs-dev] [PATCH] f2fs: fix error handling of __get_node_page
@ 2023-10-23 15:30   ` patchwork-bot+f2fs
  0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+f2fs @ 2023-10-23 15:30 UTC (permalink / raw)
  To: Zhiguo Niu; +Cc: jaegeuk, niuzhiguo84, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed, 18 Oct 2023 14:51:02 +0800 you wrote:
> Use f2fs_handle_error to record inconsistent node block error
> and return -EFSCORRUPTED instead of -EINVAL.
> 
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
>  fs/f2fs/node.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [f2fs-dev] f2fs: fix error handling of __get_node_page
    https://git.kernel.org/jaegeuk/f2fs/c/9b4c8dd99fe4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




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

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

end of thread, other threads:[~2023-10-23 15:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18  6:51 [PATCH] f2fs: fix error handling of __get_node_page Zhiguo Niu
2023-10-18  6:51 ` [f2fs-dev] " Zhiguo Niu
2023-10-23 15:30 ` patchwork-bot+f2fs
2023-10-23 15:30   ` patchwork-bot+f2fs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.