lkml.org 
[lkml]   [1997]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dcache and VFAT
Colin Plumb wrote:
> The problem is, ~ is a legal character in a long filename.
> For fun (and to find a bug in Windows 95), try the following from
> the Windows 95 file manager:
> - Create a new text file, foobarbaz.txt. Note that the
> short name (File/pRoperties/MS-DOS name) is FOOBARBA.TXT.
> - Now create another new file, foobarba.txt. Its short name
> is FOOBAR~1.TXT.
> - Now rename foobarbaz.txt to foobar~1.txt. The second file disappears!
>
> (Well, until you hit refresh, and you find that its short name has
> been magically changed to FOOBAR~3.TXT or some such.)
>
> I'm still working on creating a file named "foobar~1.txt" with a short name
> of "foobar~2.txt". Maybe it's not possible. (But VFAT better not crash
> if fed a disk edited to contain such a nasty situation.)
>
> But still, it's a bit tricky to distinguish short and long names.

Granted that it's tricky to tell a long filename from some possible
aliases, but as long as the dentries are only created with the long
name, it will be possible to avoid a disk search whenever a name can be
ruled out as a short alias. For example, when searching for the
foobarbaz.txt name the d_compare routine would only need to look at the
in-memory dentries, as the name is too long to be an alias. Since the
name mangling comes into play only when the name is too long to express
as an 8.3 pattern, shorter and longer names should be distinguishable
from the automatically generated ones.

Given a small set of rules to exclude possible short aliases, the
compare operation won't need to do a disk search for many cases.

Regards,
Bill

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.041 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site