Re: large directory handling speed

Alexander Viro (viro@math.psu.edu)
Mon, 31 May 1999 11:49:04 -0400 (EDT)


On Mon, 31 May 1999, Jamie Lokier wrote:

> Alexander Viro wrote:
> > Hmm... It is quadratic on ext2 too. I'm very sceptical about populating
> > dcache on readdir() for any filesystem, mostly because it will be useless
> > on small directories and will trigger cache reaping on the large ones. The
> > same applies to icache.
>
> It would be a *bad* idea to populate inode cache on readdir() -- the
> inodes are often in a very bad order on the disk. Especially
> directories containing other directories (on ext2).
>
> To populate the dentry cache, we should add "dentry without inode" -- a
> dentry for which we have the inode number, but haven't fetched the inode
> itself yet. The mechanism isn't there, but wouldn't be hard to add IMO.
> Thus your issue about icache reaping goes away completely.

There is no such thing as persistent inode numbers on many filesystems,
VFAT included. Period. Inumbers are good for UNIX-type filesystems and
nowhere else. iget() is *badly* abused in many places and that leads to
shitload of race conditions.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/