From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] fsck.f2fs: disable linear lookup by default
Date: Tue, 22 Jul 2025 11:20:08 +0800 [thread overview]
Message-ID: <20250722032008.2871359-1-chao@kernel.org> (raw)
As we know, Android is the only user of casefold feature, in casefolded
directory, creating a filename w/ character has ignorable code points in
buggy kernel v6.12 is a very rare case, we don't get any report that user
can not access file w/ character has ignorable code points till now.
Let's disable linear lookup in fsck for Android by default, once there is
any related bug report of unicode code points, we can enable it again.
mkfs.f2fs -f -O casefold -C utf8 /dev/vdb
dump.f2fs -d3 /dev/vdb |grep s_encoding_flags
s_encoding_flags [0x 0 : 0]
fsck.f2fs /dev/vdb -g android
dump.f2fs -d3 /dev/vdb |grep s_encoding_flags
s_encoding_flags [0x 2 : 2]
Signed-off-by: Chao Yu <chao@kernel.org>
---
fsck/main.c | 5 ++++-
man/fsck.f2fs.8 | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fsck/main.c b/fsck/main.c
index c5d4159..e05c23a 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -91,7 +91,7 @@ void fsck_usage()
MSG(0, " --no-kernel-check skips detecting kernel change\n");
MSG(0, " --kernel-check checks kernel change\n");
MSG(0, " --debug-cache to debug cache when -c is used\n");
- MSG(0, " --nolinear-lookup=X X=1: disable linear lookup, X=0: enable linear lookup\n");
+ MSG(0, " --nolinear-lookup=X X=1: disable linear lookup, X=0: enable linear lookup. For android case, it will disable linear lookup by default\n");
MSG(0, " --fault_injection=%%d to enable fault injection with specified injection rate\n");
MSG(0, " --fault_type=%%d to configure enabled fault injection type\n");
exit(1);
@@ -224,6 +224,9 @@ static void add_default_options(void)
if (c.func == FSCK) {
/* -a */
c.auto_fix = 1;
+
+ /* disable linear lookup by default */
+ c.nolinear_lookup = LINEAR_LOOKUP_DISABLE;
} else if (c.func == RESIZE) {
c.force = 1;
}
diff --git a/man/fsck.f2fs.8 b/man/fsck.f2fs.8
index 89cc455..c20c431 100644
--- a/man/fsck.f2fs.8
+++ b/man/fsck.f2fs.8
@@ -68,7 +68,7 @@ Specify the level of debugging options.
The default number is 0, which shows basic debugging messages.
.TP
.BI \--nolinear-lookup
-Tune linear lookup fallback, must specify an argument, 0: enable linear lookup, 1: disable linear lookup.
+Tune linear lookup fallback, must specify an argument, 0: enable linear lookup, 1: disable linear lookup. For android case, it will disable linear lookup by default.
.TP
.BI \-\-fault_injection=%d " enable fault injection"
Enable fault injection in all supported types with specified injection rate.
--
2.49.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
reply other threads:[~2025-07-22 3:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250722032008.2871359-1-chao@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.