* JFFS2 case insensitivity
@ 2004-01-27 10:06 Jarkko Lavinen
2004-01-27 11:13 ` David Woodhouse
2004-01-27 13:48 ` David Woodhouse
0 siblings, 2 replies; 8+ messages in thread
From: Jarkko Lavinen @ 2004-01-27 10:06 UTC (permalink / raw)
To: MTD List
How difficult it would be to add support for file name case
insensitivity to JFFS2?
Jarkko Lavinen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: JFFS2 case insensitivity
2004-01-27 10:06 JFFS2 case insensitivity Jarkko Lavinen
@ 2004-01-27 11:13 ` David Woodhouse
2004-01-27 13:48 ` Jarkko Lavinen
2004-01-27 13:48 ` David Woodhouse
1 sibling, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2004-01-27 11:13 UTC (permalink / raw)
To: Jarkko Lavinen; +Cc: MTD List
On Tue, 2004-01-27 at 12:06 +0200, Jarkko Lavinen wrote:
> How difficult it would be to add support for file name case
> insensitivity to JFFS2?
Fairly, It's ugly, evil and painful when FAT tries to do it, and it
wouldn't be any less so in JFFS2. I suspect you'd be far better off
doing it in userspace.
In the kernel, you end up with 'interesting' dcache coherency problems
and charset problems and generally end up going insane.
What precisely is the problem you're trying to solve?
--
dwmw2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: JFFS2 case insensitivity
2004-01-27 10:06 JFFS2 case insensitivity Jarkko Lavinen
2004-01-27 11:13 ` David Woodhouse
@ 2004-01-27 13:48 ` David Woodhouse
1 sibling, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2004-01-27 13:48 UTC (permalink / raw)
To: Jarkko Lavinen; +Cc: MTD List
On Tue, 2004-01-27 at 12:06 +0200, Jarkko Lavinen wrote:
> How difficult it would be to add support for file name case
> insensitivity to JFFS2?
I'm dubious about the need for this.
You only need case insensitivity when the filename you're given is wrong
in case only -- which is basically only if you're taking input from the
user and trying to look up a filename directly, surely?
On an embedded device, how often are your filenames coming from external
sources in that way, rather than being chosen by the user from a list?
Even then, it should be easy enough to do it in userspace if you really
need it.
Unless, of course, you're pondering a port to WinCE. In which case it's
easier than it would be under Linux. You don't actually _use_ the
readdir() and lookup() functions which the Linux version uses, you
implement real FindFirst() and FindNext() functions directly on top of
the JFFS2 core code, and can do what you want.
--
dwmw2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: JFFS2 case insensitivity
2004-01-27 11:13 ` David Woodhouse
@ 2004-01-27 13:48 ` Jarkko Lavinen
2004-01-27 15:18 ` David Woodhouse
2004-02-20 21:01 ` David Woodhouse
0 siblings, 2 replies; 8+ messages in thread
From: Jarkko Lavinen @ 2004-01-27 13:48 UTC (permalink / raw)
To: MTD List; +Cc: David Woodhouse
On Tue, Jan 27, 2004 at 11:13:28AM +0000, David Woodhouse wrote:>
> What precisely is the problem you're trying to solve?
User space people want the file name case insensitivity. I guess the
old files are likely to be selected from a list on an embedded device.
However case insensitivity is a desirable feature when adding new file
names.
My primary concern was to estimate the cost or pain of implementing
file name case insensitivity and find arguments against doing it in
the kernel.
Jarkko Lavinen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: JFFS2 case insensitivity
2004-01-27 13:48 ` Jarkko Lavinen
@ 2004-01-27 15:18 ` David Woodhouse
2004-01-27 22:49 ` Charles Manning
2004-02-20 21:01 ` David Woodhouse
1 sibling, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2004-01-27 15:18 UTC (permalink / raw)
To: Jarkko Lavinen; +Cc: MTD List
On Tue, 2004-01-27 at 15:48 +0200, Jarkko Lavinen wrote:
> User space people want the file name case insensitivity. I guess the
> old files are likely to be selected from a list on an embedded device.
> However case insensitivity is a desirable feature when adding new file
> names.
What do you mean, precisely? You're still describing the imagined
solution rather than the problem.
Case sensitivity is more clearly applicable in _lookup_ -- when trying
to find a given file from its name.
In the case of file _creation_, that affects the collision detection --
case insensitivity will usually cause you to be forbidden from creating
a new file with a name which differs from an existing name only in case.
Is that what they want it for? Why -- what is the real source of the
requirement?
> My primary concern was to estimate the cost or pain of implementing
> file name case insensitivity and find arguments against doing it in
> the kernel.
It is fairly painful -- you have to provide your own dentry_ops for
comparison and hashing, which mostly sorts out the evil dcache coherency
issues we used to have with case-insensitivity.
But you still have to know the character set. That was vaguely OK for
FAT, where we had to play charset games anyway, but I _really_ don't
want to have the JFFS2 code play with character sets and know that û is
really the same as Û, etc. And don't get me started on Ŵ and ŵ :)
You really ought to be able to do this in userspace.
--
dwmw2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: JFFS2 case insensitivity
2004-01-27 15:18 ` David Woodhouse
@ 2004-01-27 22:49 ` Charles Manning
2004-01-28 6:13 ` David Woodhouse
0 siblings, 1 reply; 8+ messages in thread
From: Charles Manning @ 2004-01-27 22:49 UTC (permalink / raw)
To: David Woodhouse, Jarkko Lavinen; +Cc: MTD List
On Wednesday 28 January 2004 04:18, David Woodhouse wrote:
> > My primary concern was to estimate the cost or pain of implementing
> > file name case insensitivity and find arguments against doing it in
> > the kernel.
>
> It is fairly painful -- you have to provide your own dentry_ops for
> comparison and hashing, which mostly sorts out the evil dcache coherency
> issues we used to have with case-insensitivity.
>
> But you still have to know the character set. That was vaguely OK for
> FAT, where we had to play charset games anyway, but I _really_ don't
> want to have the JFFS2 code play with character sets and know that û is
> really the same as �, etc. And don't get me started on Ŵ and ŵ :)
>
> You really ought to be able to do this in userspace.
I agree completely with David.
I had to add case insensitivity to YAFFS for WinCE. There were enough wierd
things just to make that work. On top of that, with Linux there is all the
overhead of modifying dentry behaviour, handling renaming oddities etc. This
is non-trivial to get right.
Doing this in user space is by far the easiest.
-- Charles
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: JFFS2 case insensitivity
2004-01-27 22:49 ` Charles Manning
@ 2004-01-28 6:13 ` David Woodhouse
0 siblings, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2004-01-28 6:13 UTC (permalink / raw)
To: manningc2; +Cc: MTD List, Jarkko Lavinen
On Wed, 2004-01-28 at 11:49 +1300, Charles Manning wrote:
> On Wednesday 28 January 2004 04:18, David Woodhouse wrote:
> > I _really_ don't want to have the JFFS2 code play with character
> > sets and know that û is really the same as �, etc. And don't get
> > me started on Ŵ and ŵ :)
Quod Erat Demonstrandum. :)
--
dwmw2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: JFFS2 case insensitivity
2004-01-27 13:48 ` Jarkko Lavinen
2004-01-27 15:18 ` David Woodhouse
@ 2004-02-20 21:01 ` David Woodhouse
1 sibling, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2004-02-20 21:01 UTC (permalink / raw)
To: Jarkko Lavinen; +Cc: MTD List
On Tue, 2004-01-27 at 15:48 +0200, Jarkko Lavinen wrote:
> My primary concern was to estimate the cost or pain of implementing
> file name case insensitivity and find arguments against doing it in
> the kernel.
See the linux-kernel mailing list (search for 'UTF-8 and
case-insensitivity').
--
dwmw2
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-02-20 21:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-27 10:06 JFFS2 case insensitivity Jarkko Lavinen
2004-01-27 11:13 ` David Woodhouse
2004-01-27 13:48 ` Jarkko Lavinen
2004-01-27 15:18 ` David Woodhouse
2004-01-27 22:49 ` Charles Manning
2004-01-28 6:13 ` David Woodhouse
2004-02-20 21:01 ` David Woodhouse
2004-01-27 13:48 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox