lkml.org 
[lkml]   [1997]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dcache questions
Linus Torvalds writes:
> The real solution is as far as I can tell:
> - don't allow the short aliases at all - only show LongFileName.exe,
> and never show or accept longfi~1.exe. This is the quick and
> dirty fix. Not recommended, and probably hard.

Not really an option. Wine makes use of these on vfat partitions.
In the context of working with Microsoft applications, there are reasons
to want to get at them. It actually isn't very hard to implement.

> - make the filesystem-specific hashing and name comparing functions
> compare the two names as equal - so that only one dentry exists for
> both of them. This is the "real" fix, but depending on how the name
> mangling works it may not be all that easy.

Name mangling is such that for any given long filename, you can end up
with a random alias. In general, you don't, but you can't count on the
alias having anything to do with the long filename.

> So the VFS dentry layer does support these kinds of aliases, but it may
> be extremely non-trivial to actually get the compare functions working
> correctly. You may end up having to do pretty much the same as you do
> in the filename lookup function in the name compare code..

Yeash, the vfat_cmp code is starting to look very similar to the vfat_lookup
code. I think I may have a handle on how to get things to work, and it
is definitely not trivial or elegant. Almost makes me long for the days
of the old and not very useful directory cache.

- Gordon


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