f2fs: retry to update the inode page given data corruption
authorJaegeuk Kim <jaegeuk@kernel.org>
Mon, 30 Jan 2023 23:20:09 +0000 (15:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:48:50 +0000 (08:48 +0100)
commita6ef5a9d72637e492a0656487a0fb68826440b91
tree746601b0cb00420bd7a3e758d08b1cdd727588a3
parenta517c651f116c11b487ea12361ce52f62fe4df7e
f2fs: retry to update the inode page given data corruption

[ Upstream commit 3aa51c61cb4a4dcb40df51ac61171e9ac5a35321 ]

If the storage gives a corrupted node block due to short power failure and
reset, f2fs stops the entire operations by setting the checkpoint failure flag.

Let's give more chances to live by re-issuing IOs for a while in such critical
path.

Cc: stable@vger.kernel.org
Suggested-by: Randall Huang <huangrandall@google.com>
Suggested-by: Chao Yu <chao@kernel.org>
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/inode.c