Support for case-insensitive file system operations has been integrated into the Linux kernel for the Ext4 filesystem.

Ted Ts’o, the creator of the ext2/ext3/ext4 file systems, accepted has added to the Linux-next branch, from which the Linux kernel 5.2 release will be formed, a set the changes, implementing case-insensitive operations support in the Ext4 file system. The patches also add support for UTF-8 characters in file names.

The case-insensitive mode can be optionally enabled for specific directories using a new attribute ‘+F’ (EXT4_CASEFOLD_FL). When this attribute is set on a directory, all operations on files and subdirectories within it will be case-insensitive, including ignoring case during file searching and opening (for example, files Test.txt, test.txt, and test.TXT in such directories will be considered identical). By default, except for directories with the ‘+F’ attribute, the file system remains case-sensitive. A modified set of utilities is proposed for managing the enabling of the case-insensitive mode. e2fsprogs.

The patches were prepared by Gabriel Krisman Bertazi, an employee of Collabora, and accepted after the seventh attempt after three years of development and addressing the feedback. The implementation does not change the disk storage format and works solely at the level of modifying the name comparison logic in the ext4_lookup() function and replacing the hash in the dcache (Directory Name Lookup Cache) structure. The value of the ‘+F’ attribute is stored within the inodes of individual directories and applies to all nested files and subdirectories. The encoding information is preserved in the superblock.

To avoid name collisions with existing files, the ‘+F’ attribute can only be set on empty directories in file systems where Unicode support for file and directory names is enabled during the mount phase. The names of directory elements for which the ‘+F’ attribute is activated are automatically converted to lowercase and reflected in this form in the dcache, but are stored on disk in the original user-defined format, meaning that although case-insensitive processing of names occurs, names are displayed and preserved without losing case information (however, the system will not allow the creation of a file name with the same characters but in a different case).

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster