
The ext4 filesystem has had the “casefold” option for a while now <https://lwn.net/Articles/784041/>. This allows you to specify, when you initialize a new filesystem, that you want file/directory names to be treated as case-insensitive. At the same time, you have to specify that the filenames are to be interpreted as UTF-8 encoding; normally the kernel doesn’t care, it only singles out ASCII slash and NUL bytes for special interpretation, and simply passes through any other byte values in the names. I was able to create such a filesystem, but I wasn’t able to mount it in my last-upgraded-just-a-few-days-ago Debian Unstable setup. When I try, it fails, and in the dmesg log I see Filesystem with casefold feature cannot be mounted without CONFIG_UNICODE Turns out the Debian 5.10 kernel has not been built with this CONFIG_UNICODE option enabled. However, this situation looks set to change shortly, according to <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985689>.

On Thu, 26 Aug 2021 18:33:04 +1200, I wrote:
The ext4 filesystem has had the “casefold” option for a while now ...
I was able to create such a filesystem, but I wasn’t able to mount it in my last-upgraded-just-a-few-days-ago Debian Unstable setup. ...
Turns out the Debian 5.10 kernel has not been built with this CONFIG_UNICODE option enabled.
Just did another upgrade today, and the new 5.14 kernel has this option. You also need to do chattr +F «dir» on each directory within the filesystem within which you want to have case folding enabled. The directory must be empty at the time this option is set or unset. The attribute setting is propagated by default to subdirectories of such a directory, but you can change this afterwards.

On Thu, 26 Aug 2021 18:33:04 +1200, I wrote:
The ext4 filesystem has had the “casefold” option for a while now <https://lwn.net/Articles/784041/>.
I was able to create such a filesystem, but I wasn’t able to mount it in my last-upgraded-just-a-few-days-ago Debian Unstable setup.
I just tried it again today. I created the filesystem with mkfs -t ext4 -E encoding=utf8 «block-device» then mounted it as normal. There is initially no difference in behaviour from any other ext4 volume. The casefold feature needs to be enabled on a per-directory basis within that filesystem: chattr +F «dirname» (the directory must be empty at the time the attribute is changed). And now you will see that, while case is preserved on initial creation of items within that directory, those item names will match case-insensitively. Also the +F attribute automatically propagates to any subdirectories created within that directory. You can display its setting on any directory with the “lsattr” command.

That's very cool that you can do that on a per directory basis! Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, Hamilton, NZ Mobile +64 22 190 2375 https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/ 6/02/2024 13:48:56 Lawrence D'Oliveiro <ldo(a)geek-central.gen.nz>:
On Thu, 26 Aug 2021 18:33:04 +1200, I wrote:
The ext4 filesystem has had the “casefold” option for a while now <https://lwn.net/Articles/784041/>.
I was able to create such a filesystem, but I wasn’t able to mount it in my last-upgraded-just-a-few-days-ago Debian Unstable setup.
I just tried it again today. I created the filesystem with
mkfs -t ext4 -E encoding=utf8 «block-device»
then mounted it as normal. There is initially no difference in behaviour from any other ext4 volume. The casefold feature needs to be enabled on a per-directory basis within that filesystem:
chattr +F «dirname»
(the directory must be empty at the time the attribute is changed). And now you will see that, while case is preserved on initial creation of items within that directory, those item names will match case-insensitively.
Also the +F attribute automatically propagates to any subdirectories created within that directory. You can display its setting on any directory with the “lsattr” command. _______________________________________________ wlug mailing list -- wlug(a)list.waikato.ac.nz | To unsubscribe send an email to wlug-leave(a)list.waikato.ac.nz Unsubscribe: https://list.waikato.ac.nz/postorius/lists/wlug.list.waikato.ac.nz
participants (2)
-
Lawrence D'Oliveiro
-
Peter Reutemann