OpenDir and large directories

James Peach jpeach at samba.org
Mon Oct 10 02:00:27 GMT 2005


On Mon, 2005-10-10 at 03:28 +0200, Nadav Danieli wrote:
> Hi,
> 
> As I already saw in several posts OpenDir with very large directories is
> a bit of a problem to say the least.
> My main issue is mostly with the stat calls that follows it, and it is
> even worse since it is made on NFS mount that is accessed from several
> machines and therefore attributes must not be cached.
> I can think of several optimizations I can make, but in order to do them
> I need to change the way OpenDir, ReadDirName, and CloseDir work.
> I assume the main if not the only reason (if there are others I would be
> glad to hear about them,) OpenDir reads the whole dir first, is done for
> caching.

This code hasn't read the entire directory since around 3.0.14 IIRC.
What version of the source are you looking at?

-- 
James Peach | jpeach at samba.org



More information about the samba-technical mailing list