I agree that case-insensitive filesystems should be an esoteric feature, but given that they’re the default on Windows and macOS, it should definitely be a well-supported option on Linux for the sake of compatibility.
I've set the Samba shares on my NAS to be case-sensitive, as making them case-insensitive slows down directory access by orders of magnitude.
I've been running this for years accessing them both from Linux desktops and Windows desktops, and only once have I had an issue that required me to manually rename something on the NAS.
This makes sense as most applications don't care about the filename, and will just use what you supply, or generate one and use that string all over.
Yep, that's true. It's the cache misses that kill performance. If the client asks for file "Foo", and the (l)stat fails to find it, then we have to scan the whole directory looking for any case-differing versions of "foo" "FOO" "fOo" etc.
Very costly, but the only way to give case-insensitivity.
> Very costly, but the only way to give case-insensitivity.
That is very costly — but it's certainly not the only way to provide case-insensitivity, nor is it the recommended way, and I'd be surprised if any implementation of case-insensitivity actually did what you say.
Normally one would lowercase (or uppercase) both strings, and then do the comparison.
The complexity here usually comes when case-folding various tricky locales.
Ah, my bad: In the post I was replying to, I thought you were saying that all of the permutation were enumerated and tested for — which we can all agree is terrible.
I now understand you mean that the directory is in fact scanned (and filenames compared in a case insensitive manner) once a miss occurs. Which is what I was hinting at.
Apologies, I misunderstood your post — and my reply could have been clearer also.
I've been running this for years accessing them both from Linux desktops and Windows desktops, and only once have I had an issue that required me to manually rename something on the NAS.
This makes sense as most applications don't care about the filename, and will just use what you supply, or generate one and use that string all over.