Re: Eureka! (was Re: UTF-8 and case-insensitivity)

Linus Torvalds
2004-02-19T23:57:55Z

On Fri, 20 Feb 2004 tridge@samba.org wrote:
>
> What your proposal doesn't give us is case-insensitive indexing into
> the dcache.

Correct.

And I've told you OVER AND OVER again that you have a choice: better than
what you do now, or nothing. Whining about the fact that Windows is
stupid will only make me convinced that there is no point to even helping
samba, since what you really want is WNT.

If what you want is WNT, then go away. That's not what I'm offering. And
it's not going to _be_ that I offer.

I offer you _sane_ VFS semantics, with some accelerators for your insane
needs. If that isn't enough, then please just stop bothering me.

Comprende?

> The reason the dcache is such a great thing in Linux is
> that it is indexed by name, so you rarely do any scanning at all

And that is still true of any exact matches.

If you have a fuzzy lookup of a name that does exist, but doesn't match,
or you have a new name that simply doesn't _exist_ in the dcache, then you
will have to scan all dentries. But now you can scan them in-memory by
following the pointers directly without having to index through the
filesystem data structures and worrying about disk reads. And you can
optimize that to do a fast mismatch (ie in most cases you can probably
look at the first one of two characters and determine immediately that
there is no match).

The only way to avoid that is to make the hash weaker. Which I'm not
willing to do: I'm not willing to make the _proper_ lookups go slower
because of some insane crap generated by Microsoft.

In other words, put up or shut up. If you are only going to repeat your
whine about how you want the Linux VFS layer to look like Windows, I'm
simply NOT INTERESTED.

Linus