Re: UTF-8 and case-insensitivity
From: viro
Date: Tue Feb 17 2004 - 14:45:39 EST
On Tue, Feb 17, 2004 at 08:57:40AM -0800, Linus Torvalds wrote:
> Trust me, this is much less intrusive, and a lot easier to debug too. It
> won't be as fast as the regular path operations, but depending on what the
> common cases are (hopefully "look up name that is exact"), it would likely
> not be horrible either. And it could probably be debugged as a real
> module, without impacting any existing code, which would make it a lot
> easier to create.
>
> See where I'm going? Would this be acceptable to you? Are there any samba
> people who are knowledgeable about the VFS-layer and have the time/energy
> to try something like this?
>
> Al? What do you think?
What will protect your generation counts during the operation itself?
->i_sem?
If anything, I'd suggest doing it as
cretinous_rename(dir_fd, name1, name2)
with the following semantics:
* if directory had been changed since open() that gave us dir_fd -
-EFOAD
* otherwise, rename name1 to name2 (no cross-directory renames here).
No need to expose generation counts to userland - we can just compare the
count at open() time with that at operation time. The rest can be done
in userland (including creation of files).
We _definitely_ don't want to put "UTF-8 case-insensitive comparison" anywhere
near the kernel - it's insane. If samba wants it, they get to pay the price,
both in performance and keeping butt-ugly code (after all, the goal of project
is to imitate butt-ugly system for butt-ugly clients). The same goes for Wine.
And we really don't want to encourage those who port Windows userland in
not fixing the idiotic semantics. As for Lindows... let's just say that
I can't find any way to describe what I really think of those clowns, their
intellect and their morals that wouldn't lead to a lawsuit from them.
-
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/