All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Autumn Ashton <misyl@froggi.es>,
	Matthew Wilcox <willy@infradead.org>,
	Theodore Ts'o <tytso@mit.edu>,
	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: Sun, 27 Apr 2025 20:13:07 -0700	[thread overview]
Message-ID: <20250428031307.GE6134@sol.localdomain> (raw)
In-Reply-To: <yarkxhxub75z3vj47cidpe4vfk5b6cdx5mip2ummgyi6v6z4eg@rnfiud3fonxs>

On Sun, Apr 27, 2025 at 11:01:20PM -0400, Kent Overstreet wrote:
> On Sun, Apr 27, 2025 at 07:39:46PM -0700, Linus Torvalds wrote:
> > On Sun, 27 Apr 2025 at 19:22, Eric Biggers <ebiggers@kernel.org> wrote:
> > >
> > > I suspect that all that was really needed was case-insensitivity of ASCII a-z.
> > 
> > Yes. That's my argument. I think anything else ends up being a
> > mistake. MAYBE extend it to the first 256 characters in Unicode (aka
> > "Latin1").
> > 
> > Case folding on a-z is the only thing you could really effectively
> > rely on in user space even in the DOS times, because different
> > codepages would make for different rules for the upper 128 characters
> > anyway, and you could be in a situation where you literally couldn't
> > copy files from one floppy to another, because two files that had
> > distinct names on one floppy would have the *same* name on another
> > one.
> > 
> > Of course, that was mostly a weird corner case that almost nobody ever
> > actually saw in practice, because very few people even used anything
> > else than the default codepage.
> > 
> > And the same is afaik still true on NT, although practically speaking
> > I suspect it went from "unusual" to "really doesn't happen EVER in
> > practice".
> 
> I'm having trouble finding anything authoritative, but what I'm seeing
> indicates that NTFS does do Unicode casefolding (and their own
> incompatible version, at that).

NTFS "just" has a 65536-entry table that maps UTF-16 coding units to their
"upper case" equivalents.  So it only does 1-to-1 codepoint mappings, and only
for U+FFFF and below.

I suspect that it's the same, or at least nearly the same, as what
https://www.unicode.org/Public/16.0.0/ucd/CaseFolding.txt calls "simple"
casefolding (as opposed to "full" casefolding), but only for U+FFFF and below.

Of course, to implement the same with Linux's UTF-8 names, we won't be able to
just do a simple table lookup like Windows does.  But it could still be
implemented -- we'd just decode the Unicode codepoints from the string and apply
the same mapping from there.  Still much simpler than normalization.

- Eric

  reply	other threads:[~2025-04-28  3:13 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 [this message]
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
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=20250428031307.GE6134@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=misyl@froggi.es \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=willy@infradead.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.