Re: structure dentry help...

Theodore Y. Ts'o (tytso@MIT.EDU)
Wed, 3 Nov 1999 09:14:40 -0500


Date: Wed, 3 Nov 1999 14:29:41 +0100
From: Jamie Lokier <lkd@tantalophile.demon.co.uk>

For "find" style operations where you simply want a list of names (plus
`-type d' tests), a speedup is possible without any kernel/user API
change. Do you remember the patch to speed up `open (fn, O_DIRECTORY)'
by avoiding inode reads for non-directories? Your tune2fs feature is
the step that makes that patch effective. I will try it on a real
filesystem soon, and see how much faster treescan runs.

P.S. It would be good to make the user code check the de_type field
returned from readdir(), and not try the open(fn, O_DIRECTORY) call if
de_type is set. That way, it will be ready for when we get the full
readdir() implementation done, since while the open(O_DIRECTORY) is a
neat hack, it still involves a system call which could be avoided if we
passed the information back in readdir().

- Ted

-
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/