Re: Unicode conversion issue
From: Jaegeuk Kim
Date: Wed Dec 11 2024 - 16:53:56 EST
On 12/11, Linus Torvalds wrote:
> On Wed, 11 Dec 2024 at 13:11, Gabriel Krisman Bertazi <krisman@xxxxxxx> wrote:
> >
> > This solves it for directories with inlined dirents
> > (FI_INLINE_DENTRY). but for large directories, we use fname->hash to
> > find the right block to start the search.
>
> Grr. Dammit, the hash should always have been the original hash of the
> original actual case-preserving entry.
>
> Oh well. I'll continue to just absolutely hate case-folding, because
> while I suspect that it *could* be done correctly, I have yet to ever
> actually see any filesystem that did so.
Casefolding supports f2fs and ext4 per Android request, and only f2fs
constructs hash-based directory structure. If we use hash of the
case-preserving entry, we had no easy solution to distinguish file_A and file_a.
One possible way might be searching only filename sequentially through
the entire dentry list, if we fail to find the new encoded entry. But, it may
need a huge surgery to make it work.
>
> Linus