Deutsch   English   Français   Italiano  
<vvbook$1oubc$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Rich <rich@example.invalid>
Newsgroups: comp.os.linux.misc
Subject: Re: Case Insensitive File Systems -- Torvalds Hates Them
Date: Tue, 6 May 2025 01:31:00 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <vvbook$1oubc$1@dont-email.me>
References: <pan$4068a$3910f4f1$8cbecede$9e42905e@linux.rocks>   <20250428111242.00007426@gmail.com> <pan$c046d$e87ef491$a3427b7a$ac576dbc@linux.rocks> <slrn1011nu8.46v.rotflol2@geidiprime.bvh> <vurjl9$2pskn$1@dont-email.me> <slrn1013t50.1aev.rotflol2@geidiprime.bvh> <vAGdnR-Fj9qGS4_1nZ2dnZfqn_udnZ2d@giganews.com> <slrn1016uic.2qk.rotflol2@geidiprime.bvh> <m7hgt7F8mvgU5@mid.individual.net> <6813f997@news.ausics.net> <vvbe5q$1em7m$1@dont-email.me> <68194581@news.ausics.net>
Injection-Date: Tue, 06 May 2025 03:31:01 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="143924ecab2acd90bce63bd61485d839";
	logging-data="1866092"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+D6VeT84rLvMcOxgx9h7nM"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:y7vDsjKIn4WS9mC9mkSZaVv9g1M=
Bytes: 3999

Computer Nerd Kev <not@telling.you.invalid> wrote:
> Rich <rich@example.invalid> wrote:
>> Computer Nerd Kev <not@telling.you.invalid> wrote:
>>> I question the wisdom of Torvalds on this topic since he allowed
>>> ext filesystems to have an even greater evil than either of those:
>>> newlines in file names! Imagine if the average joe were exposed
>>> to that capability - we'd have multi-paragraph file names to deal
>>> with all over the place.
>> 
>> Torvalds did not "allow newlines".  Unix filesystems, long before Linux 
>> ever existed, have only disallowed two characters in filenames:
>> 
>> ASCII null (because C strings are ASCII null terminated)
>> 
>> The forward slash (/) (because forward slash is used as the directory 
>> separator).
>> 
>> Torvalds was simply following standard Unix protocol (in order to be 
>> compatible with Unix standards) for what was "allowed" to be in a 
>> filename.
> 
> Perhaps, but since he wasn't using existing UNIX filesystems and
> using a custom one instead, it seems to me like he had a choice.

And since all existing Unix filesystems were case sensitive, then 
building his new Unix filesystem the same way as all the others would 
have made perfect sense.

Note that the case sensitivity in Unix filesystems was not, per se.,  a 
designed in decision, it comes about because the kernel treats 
filenames as simply a raw C null terminated string (i.e., as an array 
of length N of 8-bit bytes), and "filename comparison" is done via a 
function that performs what memcmp() from libc performs, raw byte 
comparisons.  When you perform string comparisons by comparing the raw 
bytes, "case sensitivity" is the user visible outcome.

> After all you can still use FAT or NTFS on Linux even though they
> have more disallowed filename characters.

No, you can access FAT or NTFS, but you can not use them as Linux 
filesystems.  Try using FAT or NTFS as the root FS or as the /home FS 
and things won't work out well (if at all).  Neither has the required 
attributes (primarily the permissions) that are expected for use as a 
Unix filesystem.

> It could have been the same with ext* forbidding newlines (also tmpfs 
> etc.).  Then you'd only have to worry about handling newlines in the 
> rare case of reading from some non-Linux filesystems like UFS.

Could ext* have forbade newlines?  Yes.  But that would have gone 
against years of Unix tradition at the time had it done so.  Since 
Linux began as a "clone of Unix" it was only natural for it to inherit 
Unix traditions as to filenames (any byte value other than ASCII NULL 
and ASCII forward slash being allowed).