RE: UTF-8 and case-insensitivity

From: tridge
Date: Wed Feb 18 2004 - 20:48:31 EST


Hua,

> Do you also require NFSD or other file daemons to do the same
> case-insensitivity check?

no. That's the point of the per-process check. Only Samba needs to pay
the price.

> Say you create a foo, how do you prevent NFSD from creating FOO?
> What could you do about that?

You don't need to do anything in particular about it. I did explain
this earlier in this thread, but here goes again:

* samba always tries the name exactly as given by the client. If that
succeeds then we are done.

* if it doesn't find an exact match then it does a directory scan. It
uses the first case-insensitive matching name it finds, or if it
reaches the end of the directory then it concludes that the file
doesn't exist.

So if FOO and foo both exist in the filesystem, and someone asks for
FoO then its pretty much random which one they get (ok, not exactly
random, but close enough for this argument). The thing is that just
making an arbitrary choice is a perfectly fine set of semantics. You
can't deal with this situation any more sanely, so don't even try.

well, actually, there is something you could do that we don't do. We
could have some special marker that distinguishes files created by
windows clients and files created by unix clients, and preferentially
return the one created by windows clients, I just don't think this is
worth doing. Nobody has even complained (within earshot of me anyway)
of the current "pick one" method.

Cheers, Tridge
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/