Re: [PATCH v2 1/6] fs: Add case sensitivity info to file_kattr

Eric Biggers
2025-12-11T23:41:54Z

On Thu, Dec 11, 2025 at 10:21:11AM -0500, Chuck Lever wrote:
> +/* Values stored in the low-order byte */
> +enum fileattr_case_folding {
> + /* Code points are compared directly with no case folding. */
> + FILEATTR_CASEFOLD_NONE = 0,
> +
> + /* ASCII case-insensitive: A-Z are treated as a-z. */
> + FILEATTR_CASEFOLD_ASCII,
> +
> + /* Unicode case-insensitive matching. */
> + FILEATTR_CASEFOLD_UNICODE,
> +};

What does "Unicode case-insensitive matching" mean? There are many
different things it could mean: there are multiple types of Unicode
normalization, Unicode case-folding, NTFS's upper case table, etc.
There are also multiple versions of each.

I see you're proposing that ext4, fat, and ntfs3 all set
FILEATTR_CASEFOLD_UNICODE, at least in some cases.

That seems odd, since they don't do the matching the same way.

- Eric