lkml.org 
[lkml]   [1997]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Msdos name alias patch for 2.1.48
Linus Torvalds wrote:

> /* So what happens in fs/inode.c: lookup() is: */
>
> 'reserved_lookup()' ('.' and '..') obviously fails
> 'dcache_lookup()' fails
> 'real_lookup()'
> - 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).

Sounds reasonable, but be careful in implementing it: if the fs lookup
dputs the dentry currently passed, you'll corrupt the dentry tree. The
d_alloc()ed dentry has its parent pointer set, but hasn't incremented
the parent d_count.

Regards,
Bill

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