6 ms·
> The proposed addition of case-insensitive file-name lookups to the ext4 filesystem... Ugh, why? I thought the general consensus was that case-insensitive fil
by MrRadar 8y ago
> The proposed addition of case-insensitive file-name lookups to the ext4 filesystem...
Ugh, why? I thought the general consensus was that case-insensitive filesystems were a mistake. The article linked on that line is behind a paywall, can someone summarize the rationale for this change?
Also, this article doesn't mention how the kernel developers plan to handle differences in case folding between locales (e.g. the infamous Turkish "dotted I"). I learned recently that NTFS actually stores a full case-folding table (from the current locale of the system formatting the volume) in the filesystem metadata specifically to ensure case-folding will remain consistent even if the volume is attached to a system with a different locale which seems like the only sane way to handle this.
- bruce_one 8y agohttps://lwn.net/SubscriberLink/784041/06801df80bc16e10/ https://lwn.net/SubscriberLink/784041/06801df80bc16e10/ LWN is super great, consider subscribing :-) ;-) I remember finding the underlying reasoning fairly compelling for non-technical, or more Windows familiar, users - but my memory might be hazy...
- saagarjha 8y agomacOS's HFS+ and APFS are case-insensitive by default, which I feel is a bit less confusing to users ("What do you mean that 'document' and 'Document' are different things?! They're both 'document'!")
- amelius 8y agoInstead of worrying about such basic mechanisms, perhaps they should be thinking about bigger things, like adding Google-like search to the filesystem. User-mode approaches, such as mlocate/updatedb have not been very successful (imho).
- saagarjha 8y agoMetadata on macOS works pretty well, given that it drives Spotlight.
- lisper 8y ago> I thought the general consensus was that case-insensitive filesystems were a mistake. Where did you get that idea? Case-senstivity is NEVER the right answer. Never, never. NeVer.
- geofft 8y agoCan you expand on why it's not the right answer? (For what?) The following arguments for case-sensitivity come to mind: - Different locales treat uppercasing and lowercasing differently. In Turkish, for instance, the dotted and dotless letter I are two different letters, unlike languages where dotless uppercase I corresponds to dotted lowercase i. https://en.wikipedia.org/wiki/Dotted_and_dotless_I https://en.wikipedia.org/wiki/Dotted_and_dotless_I - There are common codebases that have files that differ only in case - for instance, the Linux kernel source tree itself has include/uapi/linux/netfilter/xt_rateest.h and include/uapi/linux/netfilter/xt_RATEEST.h with different contents. Can you supply some arguments against case-sensitivity?
- lisper 8y agoBecause you never want to distinguish between never and Never and NEVER and NeVer. They are all the same word. The only time that English is case-sensitive is when you want to distinguish between a proper noun and a similarly-spelled word, like rich and Rich. But that hardly ever matters for identifiers, which is what file names are.
- geofft 8y agoWell, I think just about all of my filenames have personal names in them - they tend to start with /home/geofft. And "never," your original claim, is not "hardly ever," your revised claim. If there are valid use cases for case-sensitive filenames, it seems like it should be allowed on robustness-principle grounds, even if they are rare, unless they impose some disproportionate cost on users of the system. And filenames don't have to be in English, and usually aren't. "geofft" is not an English word; neither is "usr" or "etc" or "tmp," let alone "xt_RATEEST.h" or "/tmp/tmp.CGZ8Lq5f". And even for common nouns in English, case matters - the UCC for instance requires certain text to be "conspicuous," and gives one example as "a heading in capitals equal to or greater in size than the surrounding text." It's pretty common for lawyers to write "conspicuous" text in all caps to satisfy this requirement. In these cases, you do want to distinguish between "never," "Never," and "NEVER".
- ploxiln 8y agoI think the primary motivation is more efficient SMB and NFS serving to systems which prefer case-insensitivity - macOS and Windows. Samba doing this in userspace is less efficient (and maybe racy) since it has to list the whole directory to check for case-insensitive match. I'll agree though, having the filesystem do case folding according to some locale is ... bad in general. But as a rarely-enabled option on linux systems just for this purpose, maybe it's not that bad.
- asveikau 8y agoI came here also to say "why dear god whyyyy". Case insensitive compares differ by language. I don't want the filesystem to have to know this, and potentially see "file not found" if a user has a language different from me. (The kernel is multi-user anyway, so ... two processes on the same machine can rightfully disagree on what "lowercase" means.)
- yellowapple 8y agoAs one example, a lot of Windows software assumes it's running on a case-insensitive filesystem, so projects like Wine would benefit from this quite a bit (historically, the only way to run case-insensitive-FS-assuming software on Linux is to either actually point that software to something case-insensitive like NTFS or use a FUSE-based userspace FS to add case-insensitivity to specific folders). This also applies to games where the modding community primarily uses Windows and thus has zero concept of case consistency (I recall this being a major issue at one point - if not still - for the Linux ports of the recent Civ games).