The guts of stat cache.

Andrew Bartlett abartlet at samba.org
Tue Mar 19 19:16:58 MDT 2013


On Tue, 2013-03-19 at 15:25 -0700, Jeremy Allison wrote:
> On Tue, Mar 19, 2013 at 05:22:37PM -0500, Christopher R. Hertel wrote:
> > 
> > So it's not replaceable from within a VFS module (augmentable, perhaps, but
> > not replaceable).
> 
> Yep.
> 
> > ...which means that it has to look at what's on disk.  I assume that it
> > caches that disk-based info so that the look-up is done internally so that
> > we can reduce the number of times we go to disk.
> 
> Yep.
> 
> > In which case, I'm confused as to why I see stat calls repeated.  I've
> > written a very simple VFS module that logs calls to the vfs .stat function,
> > and I see repeated calls on the same name (and variations of the name).
> 
> Look at what the client is asking for. Even if we get a match we
> still need to do the stat() to ensure the name is valid.

We also have the situation where multiple VFS modules may call stat on
the file as an operation goes down the stack.  It should be cached on
the fsp, but it might not be in all cases.

Adding a backtrace with each logging call might provide interesting
details.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list