[PATCH] Optimisation for readdir using fstatat.

Jeremy Allison jra at samba.org
Fri May 24 14:23:20 MDT 2013


On Fri, May 24, 2013 at 04:19:59PM -0400, Ira Cooper wrote:
> A concern raised by Richard, which I haven't had the chance to look at... Is
> the use of "stat" here premature?

No.

> (For every readdir, are we guaranteed to stat, and not lstat etc...)

If we pass in a SMB_STRUCT_STAT *sbuf then yes, we are
guaranteed to stat(). If it's a POSIX path then we will
ignore the reply from readdir() here and re-stat using
lstat() on top (see the comment in the patch). I checked
out all codepaths before adding this.

Jeremy.


More information about the samba-technical mailing list