The kernel and character set encodings
Posted Feb 21, 2004 21:14 UTC (Sat) by fiberbit
In reply to: The kernel and character set encodings
Parent article: The kernel and character set encodings
The problem lies in the checking whether or not a file with a given name (case insensitive) exists. Say you do an 'fp = fopen("filename", "a"), and "filename" doesn't exist yet, then in the case-insensitive case, you have to check whether "Filename" or "fIlename" or any other variant *does* exist.
You'd either have to try all possible combinations, or (in practice) scan the whole directory to see if any name matches (and use the first). This not only is very time consuming, but also racy in a multi process environment.
It could be solved by using case-insensitive hash functions in the dentry cache, but that would negatively impact normal filesystems, and is unacceptable to most, including the top penguin.
to post comments)