For benefiting container usage on Linux, support for case-folding / case insensitive files and folder support has been added to OverlayFS.
André Almeida with Igalia has been working for a while on adding case-fold layer support to OverlayFS for use with container tooling. For this configuration to work, every layer needs to have the same encoding setting, such as the Unicode version and flags. Almeida explained in the prior patch series:
“When merge layers, ovl uses a red-black tree to check if a given dentry name from a lower layers already exists in the upper layer. For merging case-insensitive names, we need to store then in tree casefolded. However, when displaying to the user the dentry name, we need to respect the name chosen when the file was created (e.g. Picture.PNG, instead of picture.png). To achieve this, I create a new field for cache entries that stores the casefolded names and a function ovl_strcmp() that uses this name for searching the rb_tree. For composing the layer, ovl uses the original name, keeping it consistency with whatever name the user created.
The rest of the patches are mostly for checking if casefold is being consistently used across the layers and dropping the mount restrictions that prevented case-insensitive filesystems to be mounted.”
While Linux case-folding is typically supported on a per-directory basis, in the case of OverlayFS it is an all-or-nothing.
That OverlayFS case-folding support is now merged for Linux 6.18.