lkml.org 
[lkml]   [1999]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: VFAT rename


On 16 May 1999, H. Peter Anvin wrote:

> Followup to: <373C868C.10EB@mail1.bet1.puv.fi>
> By author: "A. Wik" <aw@mail1.bet1.puv.fi>
> In newsgroup: linux.dev.kernel
> >
> > It's impossible to rename a file on a VFAT filesystem if
> > the only difference between the old and new names is case
> > (eg. longfilename and LongFilename). The operation is
> > cancelled in fs/namei.c because the lookups return the
> > same dentry for both names. What would be the most
> > reasonable way to fix this?
> >
>
> Clearly the VFS isn't the right place to make this kind of decision,
> at least if the strings don't compare identical.

It's worse than you think.
a) we should *never* allow several dentries for the same directory.
b) POSIX explicitly requires rename(foo,bar) to do nothing and just return
0 if foo and bar are the same filesystem object.
c) VFAT prohibits simultaneous existance of names that differ only in
capitalization.
d) usual interpretation of (c) being: all such names are equivalent.

Each of (b), (c) and (d) is a bug in itself. POSIX, Microsoft and DEC
resp.

You can mount it with 'check=strict' (i.e. kill (d)). That should fix the
problem (i.e. allow such renames). But then you lose case-insensitivity.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog