From 05d10b4ed8394dfc3aff558ae7b5f545e4c8b407 Mon Sep 17 00:00:00 2001 From: zhang-daiyue Date: Tue, 27 May 2025 21:22:43 +0800 Subject: [PATCH] add fsck permissive mode interface Change-Id: I73055446e5a7df60089648473d5dc18d7b193d00 Signed-off-by: zhang-daiyue --- fsck/main.c | 5 +++++ include/f2fs_fs.h | 1 + 2 files changed, 6 insertions(+) diff --git a/fsck/main.c b/fsck/main.c index f83a4af..c4832c3 100644 --- a/fsck/main.c +++ b/fsck/main.c @@ -239,6 +239,7 @@ void f2fs_parse_options(int argc, char *argv[]) {"no-kernel-check", no_argument, 0, 2}, {"kernel-check", no_argument, 0, 3}, {"debug-cache", no_argument, 0, 4}, + {"permissive", no_argument, 0, 6}, {0, 0, 0, 0} }; @@ -263,6 +264,10 @@ void f2fs_parse_options(int argc, char *argv[]) case 4: c.cache_config.dbg_en = true; break; + case 6: + c.permissive = true; + MSG(0, "Info: Enable permissive check\n"); + break; case 'a': c.auto_fix = 1; MSG(0, "Info: Fix the reported corruption.\n"); diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h index 740142c..15849b4 100644 --- a/include/f2fs_fs.h +++ b/include/f2fs_fs.h @@ -515,6 +515,7 @@ struct f2fs_configuration { bool quota_fixed; int alloc_failed; int auto_fix; + bool permissive; int layout; int show_file_map; u64 show_file_map_max_offset; -- Gitee