* [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change
@ 2024-12-10 6:58 bugzilla-daemon--- via Linux-f2fs-devel
2024-12-10 15:47 ` [f2fs-dev] [Bug 219586] " bugzilla-daemon--- via Linux-f2fs-devel
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-10 6:58 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
Bug ID: 219586
Summary: Unable to find file after unicode change
Product: File System
Version: 2.5
Hardware: All
OS: Linux
Status: NEW
Severity: blocking
Priority: P3
Component: f2fs
Assignee: filesystem_f2fs@kernel-bugs.kernel.org
Reporter: hanqi@vivo.com
Regression: No
Hi everybody,
The f2fs filesystem is unable to read some files with special characters,
such as ❤️, after the kernel was updated with the following patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=18b5f47e7da46d3a0d7331e48befcaf151ed2ddf
We can reproduce this in the following steps:
1、First, we need to roll back the unicode-related changes above and create
the special character file or folder:
./tools/mkfs.f2fs -f -O casefold -C utf8 f2fs.img
mount f2fs.img f2fs_dir/
mkdir Picture
./f2fs_io setflags casefold Picture
cd Picture
touch ❤️
2、Then we apply the above unicode patch, and after mounting the filesystem,
we get a message that the special character file was not found.
mount f2fs.img f2fs_dir/
cd Picture
ls -alh
ls: cannot access '❤️': No such file or directory
total 8
drwxr-xr-x 2 root root 3488 Dec 10 06:11 .
drwxr-xr-x 3 root root 4096 Dec 9 10:21 ..
-????????? ? ? ? ? ? ❤️
Here are the conclusions of my preliminary analysis.
In casefole-enabled f2fs filesystems, file names are converted to lowercase
by the utf8_casefold function when querying for a file, and then the hash is
calculated based on the lowercase filename and stored on disk. The path to
the function is:
f2fs_lookup
f2fs_prepare_lookup
__f2fs_setup_filename
f2fs_init_casefolded_name
utf8_casefold
f2fs_hash_filename
__f2fs_find_entry
For some files that contain special characters, such as ❤️. We found that the
length of the output characters changed after the utf8_casefold function
converted
them to lowercase before and after the patch, which ultimately led to a change
in the
calculated hash. Files created before patch are not readable after path is
enabled.
I think we need to modify the f2fs filesystem to be compatible with unicode
related changes.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-10 15:47 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-11 0:08 ` bugzilla-daemon--- via Linux-f2fs-devel
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-10 15:47 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
Artem S. Tashkinov (aros@gmx.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Bisected commit-id| |18b5f47e7da46d3a0d7331e48be
| |fcaf151ed2ddf
Regression|No |Yes
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
2024-12-10 15:47 ` [f2fs-dev] [Bug 219586] " bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-11 0:08 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-11 2:11 ` bugzilla-daemon--- via Linux-f2fs-devel
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-11 0:08 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
--- Comment #1 from Jaegeuk Kim (jaegeuk@kernel.org) ---
Hi,
I think that unicode patch introduced a regression, as old and new paths gives
a different file length. Wasn't that broken to fix?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
2024-12-10 15:47 ` [f2fs-dev] [Bug 219586] " bugzilla-daemon--- via Linux-f2fs-devel
2024-12-11 0:08 ` bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-11 2:11 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-11 4:13 ` bugzilla-daemon--- via Linux-f2fs-devel
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-11 2:11 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
--- Comment #2 from HanQi (hanqi@vivo.com) ---
(In reply to Jaegeuk Kim from comment #1)
> Hi,
>
> I think that unicode patch introduced a regression, as old and new paths
> gives a different file length. Wasn't that broken to fix?
Hi Kim,
I'm using the latest version of the kernel and following the above steps still
reproduces the problem, can you tell me which patch fixed it? My kernel version
is as follows:
uname -r
6.13.0-rc2+
Currently, the f2fs.fsck utility can only repair directories or files that are
not encrypted, but it cannot repair encrypted files with the encryption feature
because it cannot get the key to calculate the hash, so it cannot repair
encrypted files with fsck.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
` (2 preceding siblings ...)
2024-12-11 2:11 ` bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-11 4:13 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-12 8:35 ` bugzilla-daemon--- via Linux-f2fs-devel
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-11 4:13 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
--- Comment #3 from Jaegeuk Kim (jaegeuk@kernel.org) ---
IMO, you need to revert unicode patch.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
` (3 preceding siblings ...)
2024-12-11 4:13 ` bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-12 8:35 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-12 8:39 ` bugzilla-daemon--- via Linux-f2fs-devel
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-12 8:35 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
Paul Menzel (pmenzel+bugzilla.kernel.org@molgen.mpg.de) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pmenzel+bugzilla.kernel.org
| |@molgen.mpg.de
--- Comment #4 from Paul Menzel (pmenzel+bugzilla.kernel.org@molgen.mpg.de) ---
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=231825b2e1ff6ba799c5eaf396d3ab2354e37c6b
reverts the culprit and supposedly fixes the issue. Can you confirm, and close
the issues, if it does?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
` (4 preceding siblings ...)
2024-12-12 8:35 ` bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-12 8:39 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-12 15:25 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-13 1:32 ` bugzilla-daemon--- via Linux-f2fs-devel
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-12 8:39 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
HanQi (hanqi@vivo.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |CODE_FIX
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
` (5 preceding siblings ...)
2024-12-12 8:39 ` bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-12 15:25 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-13 1:32 ` bugzilla-daemon--- via Linux-f2fs-devel
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-12 15:25 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
--- Comment #5 from Chao Yu (chao@kernel.org) ---
(In reply to HanQi from comment #0)
> Hi everybody,
> The f2fs filesystem is unable to read some files with special characters,
> such as ❤️, after the kernel was updated with the following patch:
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/
> ?id=18b5f47e7da46d3a0d7331e48befcaf151ed2ddf
Hi HanQi, I guess you can report this bug to Gabriel Krisman Bertazi
<krisman@kernel.org>?
Thanks,
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
* [f2fs-dev] [Bug 219586] Unable to find file after unicode change
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
` (6 preceding siblings ...)
2024-12-12 15:25 ` bugzilla-daemon--- via Linux-f2fs-devel
@ 2024-12-13 1:32 ` bugzilla-daemon--- via Linux-f2fs-devel
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon--- via Linux-f2fs-devel @ 2024-12-13 1:32 UTC (permalink / raw)
To: linux-f2fs-devel
https://bugzilla.kernel.org/show_bug.cgi?id=219586
--- Comment #6 from HanQi (hanqi@vivo.com) ---
(In reply to Chao Yu from comment #5)
> (In reply to HanQi from comment #0)
> > Hi everybody,
> > The f2fs filesystem is unable to read some files with special characters,
> > such as ❤️, after the kernel was updated with the following patch:
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/
> > ?id=18b5f47e7da46d3a0d7331e48befcaf151ed2ddf
>
> Hi HanQi, I guess you can report this bug to Gabriel Krisman Bertazi
> <krisman@kernel.org>?
>
> Thanks,
Hi Chao, Krisman already knows about the bug. You can see the
link:https://lore.kernel.org/lkml/875xnqudr1.fsf@mailhost.krisman.be/
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
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] 9+ messages in thread
end of thread, other threads:[~2024-12-13 1:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 6:58 [f2fs-dev] [Bug 219586] New: Unable to find file after unicode change bugzilla-daemon--- via Linux-f2fs-devel
2024-12-10 15:47 ` [f2fs-dev] [Bug 219586] " bugzilla-daemon--- via Linux-f2fs-devel
2024-12-11 0:08 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-11 2:11 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-11 4:13 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-12 8:35 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-12 8:39 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-12 15:25 ` bugzilla-daemon--- via Linux-f2fs-devel
2024-12-13 1:32 ` bugzilla-daemon--- via Linux-f2fs-devel
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.