Re: Msdos name alias patch for 2.1.48

Ingo Molnar (mingo@pc7537.hil.siemens.at)
Thu, 7 Aug 1997 19:08:31 +0200 (MET DST)


On Wed, 6 Aug 1997, Linus Torvalds wrote:

[...]
> So, rough plan:

[...]
> - creates a new dentry for 'XyZZy'
> - calls the low-level lookup
> - low-level lookup finds the 'XyZZy' inode
> but notices that it already has a dentry
> by looking at the 'inode->i_dentry' list
> - low-level lookup throws away new 'XyZZy'
> dentry, and instead returns the old
> 'xyzzy' dentry
>
> How does this strike people? The above means that we only ever have one
> dentry for a filename even when you have alias names, and it requires
> almost no changes to the generic VFS layer (it requires a way for the
> low-level lookup to change the dentry, but that should be reasonably
> simple).
>
> The above will obviously not make alias name accesses very efficient: only
> the "first" alias anybody uses will be cached, and all the other ones have
> to be looked up by hand, but is this a major problem in real life?

Another thing apart speed issues is that this might confuse applications
which assume that say sys_readdir() gives canonical names? Or, maybe more
important, assumes that they never change. With this solution the name
passed back might be different from case to case.

But probably this is not a RL problem, WABI, Wine and DosEMU seems to
translate such names to canonic form anyway, as Linux passes file names in
lower case chars back currently.

-- mingo