View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001467 | channel: kernel/el9 | kernel-ml | public | 2024-07-03 22:51 | 2024-07-06 09:50 |
Reporter | sirocyl | Assigned To | toracat | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0001467: Enable filesystem UTF-8 normalization and casefolding support in kernel-ml (CONFIG_UNICODE) | ||||
Description | Filesystem casefolding, which is used for UTF-8 normalization, case-insensitive directories and filesystems, and (in particular) SteamOS and Steam Deck game storage filesystems, was a feature first added in kernel 5.2 and e2fsprogs v1.45, and improved in later versions. Support for this is not enabled in kernel-ml currently. When casefolding is not enabled in the kernel, and a drive with a casefolding EXT4 filesystem attempts to mount, this error appears in dmesg: [27547.115494] EXT4-fs (sda1): Filesystem with casefold feature cannot be mounted without CONFIG_UNICODE Enabling this will enable users to connect and mount removable storage and filesystems with the casefold feature. Recommend configuring `CONFIG_UNICODE=y` or `CONFIG_UNICODE=m`. | ||||
Steps To Reproduce | A casefold filesystem can be made with e2fsprogs (the version 1.46.5 in the current Rocky Linux 9 BaseOS distro works; >= 1.45 is required to create a new FS with it; >= 1.45.7 to enable it through tune2fs on an existing FS; >= 1.46.6 to disable it through tune2fs on an existing FS, assuming no directories with +F attrs set are present.) It can be reproduced on Rocky Linux 9.4, and possibly other EL9 distros and derivatives, despite the lack of kernel support in kernel-ml. (I'm not sure if upstream or other EL kernels enable CONFIG_UNICODE or not.) Indication of feature presence: sysfs node exists at /sys/fs/ext4/features/casefold Steps to reproduce: Per the directions in https://unix.stackexchange.com/questions/558977/how-to-enable-new-in-kernel-5-2-case-insensitivity-for-ext4-on-a-given-directory # Create/allocate a (sparse) blank file, 4GB dd if=/dev/zero of=/tmp/test-casefold.img bs=1 count=1 seek=$((2**32-1)) # Format it EXT4, with the casefold option. mkfs.ext4 -O casefold /tmp/test-casefold.img # Mount it. (as superuser) sudo mkdir /mnt/test-casefold sudo mount -o loop /tmp/test-casefold.img /mnt/test-casefold Expected outcome: filesystem mounts successfully, casefolding FS works as described, case-insensitive directories can be created, and files in those directories of same name with differing case will clash, as on Windows. Observed outcome: `mount: /mnt/test-casefold: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.` and the dmesg line remarked above. Filesystem is inaccessible and does not mount. | ||||
Additional Information | Looking at /boot/config-6.9.7-1.el9.elrepo.x86_64: # CONFIG_UNICODE is not set Casefolding-enabled EXT4 filesystems are used and formatted currently by SteamOS and Steam Deck, for external game storage (microSD cards or USB storage, for Windows game compatibility, through Proton WINE runtimes.) Casefolding support is toggled with the EXT4 "F" attribute flag per directory (`chattr +F`), and the `casefold` option parameter in the EXT4 FS. Further information on the web: - This stackexchange post explains how to go about enabling, using or testing casefolding with EXT4 quickly, and is paraphrased under "Steps To Reproduce" above. https://unix.stackexchange.com/questions/558977/how-to-enable-new-in-kernel-5-2-case-insensitivity-for-ext4-on-a-given-directory - This comment on Reddit points out that the popular EL distros ("CentOS, Rocky Linux, and I assume AlmaLinux and OracleLinux too") do not support it. https://old.reddit.com/r/SteamDeck/comments/udxfek/psa_mounting_steam_deck_formatted_sd_card_on/iilg2la/ - Collabora's blog post about it has more useful information about the feature, including the Unicode normalization support. https://www.collabora.com/news-and-blog/blog/2020/08/27/using-the-linux-kernel-case-insensitive-feature-in-ext4/ This issue is following my resolved feature request in bug 0001417 as a template. More detail is added, as the change here is not as obvious to test or verify. | ||||
Tags | No tags attached. | ||||
|
Acknowledged. |
|
Config change: aarch64 @@ -9732,7 +9732,8 @@ CONFIG_NLS_UTF8=m CONFIG_NLS_UCS2_UTILS=m CONFIG_DLM=m # CONFIG_DLM_DEBUG is not set -# CONFIG_UNICODE is not set +CONFIG_UNICODE=m +# CONFIG_UNICODE_NORMALIZATION_SELFTEST is not set CONFIG_IO_WQ=y # end of File systems x86_64 @@ -9785,7 +9785,8 @@ CONFIG_NLS_UTF8=m CONFIG_NLS_UCS2_UTILS=m CONFIG_DLM=m # CONFIG_DLM_DEBUG is not set -# CONFIG_UNICODE is not set +CONFIG_UNICODE=m +# CONFIG_UNICODE_NORMALIZATION_SELFTEST is not set CONFIG_IO_WQ=y # end of File systems |
|
The config changes will be applied to the next kernel-ml update. |
|
The latest kernel-ml set, kernel-ml-6.9.8-1.el9.elrepo now has CONFIG_UNICODE=m. Closing the ticket as 'resolved'. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-07-03 22:51 | sirocyl | New Issue | |
2024-07-03 22:51 | sirocyl | Status | new => assigned |
2024-07-03 22:51 | sirocyl | Assigned To | => toracat |
2024-07-04 13:44 | toracat | Status | assigned => acknowledged |
2024-07-04 13:44 | toracat | Note Added: 0009942 | |
2024-07-04 14:04 | toracat | Note Added: 0009943 | |
2024-07-04 15:19 | toracat | Note Edited: 0009943 | |
2024-07-04 21:15 | toracat | Status | acknowledged => assigned |
2024-07-04 21:15 | toracat | Note Added: 0009947 | |
2024-07-06 09:50 | toracat | Status | assigned => resolved |
2024-07-06 09:50 | toracat | Resolution | open => fixed |
2024-07-06 09:50 | toracat | Note Added: 0009950 |