All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
	linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] bcachefs fixes for 6.15-rc4
Date: Fri, 25 Apr 2025 14:59:10 -0500	[thread overview]
Message-ID: <20250425195910.GA1018738@mit.edu> (raw)
In-Reply-To: <CAHk-=wg546GhBGFLWiuUCB7M1b3TuKqMEARCXhCkxXjZ56FMrg@mail.gmail.com>

The resaon why I pushed for case folding was because Android userspace
needed it, for backwards compatibiliy with previous implementationsm
(which did use FAT), and the alternative we were replacing was this
horrific wrapfs implementation which Al refused to accept because it a
mess from a locking perspective; I could trivially lock up the kernel
or cause file system corruptions using fsstress when wrapfs was in the
picture.

Another use case was Valve who wanted to support Windows games that
expcted case folding to work.  (Microsoft Windows; the gift that keeps
on giving...)  In fact the engineer who worked on case folding was
paid by Valve to do the work.

That being said, I completely agree with Linus that case insensitivity
is a nightmare, and I don't really care about performance.  The use
cases where people care about this don't have directories with a large
number of entries, and we **really** don't want to encourage more use
of case insensitive lookups.  There's a reason why spent much effort
improving the CLI tools' support for case folding.  It's good enough
that it works for Android and Valve, and that's fine.

As far as Unicode changing over time, in practice, we don't really
need to care.  Unicode has promised not to make backwards incompatible
changes; they might add new characters, for some ancient Mesopotamian
script that only some academic care about, or a new set of emoji's.
Fortunately, either the case folding tables aren't getting extended
(emoji's don't have case to be folded; the ancient sumarian script
might note have the concept of case in teh first place) or we just
don't care (even if said sumarian script did *have* case folding, it's
unlikely that a cell phone user or a Valve gamer would likely to
care).

I will readily admit that Unicode is something we didn't completely
understand; never in my worst nightmares that someone would be
silly/insane enough to add the concept of zero-width characters,
including zero-width characters that end up changing how the character
is displayed (e.g., a red heart versus a black spade differs only by
adding a zero-width selector/shift character.   Sigh....)

Perhaps if we were going to do it all over, we might have only
supported ASCII, or ISO Latin-1, and not used Unicode at all.  But
then I'm sure Valve or Android mobile handset manufacturers would be
unhappy that this might not be good enough for some country that they
want to sell into, like, say, Japan or more generally, any country
beyond US and Europe.

What we probably could do is to create our own table that didn't
support all Unicode scripts, but only the ones which are required by
Valve and Android.  But that would require someone willing to do this
work on a volunteer basis, or confinuce some company to pay to do this
work.  We could probably reduce the kernel size by doing this, and it
would probably make the code more maintainable.  I'm just not sure
anyone thinks its worthwhile to invest more into it.  In fact, I'm a
bit surprised Kent decided he wanted to add this feature into bcachefs.

Sometimes, partitioning a feature which is only needed for backwards
compatibiltiy with is in fact the right approach.  And throwing good
money after bad is rarely worth it.

Cheers,

						- Ted

  parent reply	other threads:[~2025-04-25 19:59 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  2:46 [GIT PULL] bcachefs fixes for 6.15-rc4 Kent Overstreet
2025-04-25  4:20 ` Linus Torvalds
2025-04-25  4:51   ` Kent Overstreet
2025-04-25  5:23     ` Kent Overstreet
2025-04-25 16:35     ` Linus Torvalds
2025-04-25 19:40       ` Matthew Wilcox
2025-04-25 20:35         ` Linus Torvalds
2025-04-28  0:55         ` Kent Overstreet
2025-04-28  1:30           ` Eric Biggers
2025-04-28  1:43             ` Kent Overstreet
2025-04-28  2:05               ` Autumn Ashton
2025-04-28  2:16                 ` Kent Overstreet
2025-04-28  2:56                   ` Autumn Ashton
2025-04-28  2:22                 ` Eric Biggers
2025-04-28  2:34                   ` Kent Overstreet
2025-04-28  2:53                     ` Linus Torvalds
2025-04-28  3:22                       ` Kent Overstreet
2025-04-28  2:39                   ` Linus Torvalds
2025-04-28  3:01                     ` Kent Overstreet
2025-04-28  3:13                       ` Eric Biggers
2025-04-28  3:16                       ` Linus Torvalds
2025-04-28  2:15               ` Eric Biggers
2025-04-28  2:33                 ` Kent Overstreet
2025-04-28  2:49                   ` Eric Biggers
2025-04-28  3:29                     ` Kent Overstreet
2025-04-25 19:59       ` Theodore Ts'o [this message]
2025-05-01  2:48         ` H. Peter Anvin
2025-05-01  3:11           ` Kent Overstreet
2025-05-01  3:12           ` Linus Torvalds
2025-05-01  3:32             ` H. Peter Anvin
2025-05-01  4:55               ` Carl E. Thompson
2025-05-01  4:51             ` H. Peter Anvin
2025-04-26  1:38       ` Kent Overstreet
2025-04-26  2:47         ` Linus Torvalds
2025-04-26  3:00           ` Kent Overstreet
2025-04-26  3:04             ` Linus Torvalds
2025-04-26  3:09               ` Kent Overstreet
2025-04-26  3:40                 ` Linus Torvalds
2025-04-26  3:59                   ` Kent Overstreet
2025-04-26  4:11                     ` Linus Torvalds
2025-04-26  4:49                       ` Kent Overstreet
2025-04-26  5:01                         ` Linus Torvalds
2025-04-26  5:18                           ` Kent Overstreet
2025-04-29 15:36                   ` Patrick Donnelly
2025-04-29 16:21                     ` Kent Overstreet
2025-04-29 16:48                       ` Patrick Donnelly
2025-04-25 18:01 ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250425195910.GA1018738@mit.edu \
    --to=tytso@mit.edu \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.