Re: Eureka! (was Re: UTF-8 and case-insensitivity)

viro
2004-02-19T20:45:25Z

On Thu, Feb 19, 2004 at 12:32:55PM -0800, Linus Torvalds wrote:
> Anyway, if we're willing to make some other changes to the VFS layer, we
> could make all of this a bit more efficient by _not_ requiring the actual
> filesystem lookup to take place.
>
> If we had a flag that allowed a dentry to not have a d_inode pointer, but
> still _not_ be considered automatically negative, then we could just make
> a loop that fills the dcache directly from the readdir() data inside the
> kernel, without calling down to the filesystem to look up the inode.
>
> That would save a _lot_ of memory - quite often we'd only need the dentry
> itself.

> So then we could have a dcache that is fully populated, even though the
> actual inode data hasn't been loaded yet.
>
> Comments?

*Ugh*

That will cause all sorts of nastiness for filesystems that _have_
case-insensitive lookups. Remember the crap we had to deal with to avoid
multiple dentries for directory? It will come back, AFAICS.

Another thing I really don't like is that we now get real lookups
on hashed dentry. That potentially changes a lot and can lead to very
interesting results for some filesystems.