f2fs: support errors=remount-ro|continue|panic mountoption

This patch supports errors=remount-ro|continue|panic mount option
for f2fs.

f2fs behaves as below in three different modes:
mode			continue	remount-ro	panic
access ops		normal		noraml		N/A
syscall errors		-EIO		-EROFS		N/A
mount option		rw		ro		N/A
pending dir write	keep		keep		N/A
pending non-dir write	drop		keep		N/A
pending node write	drop		keep		N/A
pending meta write	keep		keep		N/A

By default it uses "continue" mode.

[Yangtao helps to clean up function's name]
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu
2023-04-23 23:49:15 +08:00
committed by Jaegeuk Kim
parent ac9a78681b
commit b62e71be21
8 changed files with 167 additions and 24 deletions

View File

@@ -351,6 +351,22 @@ age_extent_cache Enable an age extent cache based on rb-tree. It records
data block update frequency of the extent per inode, in
order to provide better temperature hints for data block
allocation.
errors=%s Specify f2fs behavior on critical errors. This supports modes:
"panic", "continue" and "remount-ro", respectively, trigger
panic immediately, continue without doing anything, and remount
the partition in read-only mode. By default it uses "continue"
mode.
====================== =============== =============== ========
mode continue remount-ro panic
====================== =============== =============== ========
access ops normal noraml N/A
syscall errors -EIO -EROFS N/A
mount option rw ro N/A
pending dir write keep keep N/A
pending non-dir write drop keep N/A
pending node write drop keep N/A
pending meta write keep keep N/A
====================== =============== =============== ========
======================== ============================================================
Debugfs Entries