Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [PATCH] Optimisation for readdir using fstatat.

2 views
Skip to first unread message

Ira Cooper

unread,
May 24, 2013, 4:19:59 PM5/24/13
to
A concern raised by Richard, which I haven't had the chance to look at...
Is the use of "stat" here premature?

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

-Ira


On Fri, May 24, 2013 at 4:01 PM, Jeremy Allison <j...@samba.org> wrote:

> Ira (and others of course :-),
>
> This is the complete proposed patch to improve
> directory performance for deep directory trees.
> Can you test and review +1 if you're ok with it.
>
> Cheers,
>
> Jeremy.
>

Stefan (metze) Metzmacher

unread,
May 25, 2013, 3:13:48 AM5/25/13
to
Hi Jeremy,

> --- a/source3/wscript
> +++ b/source3/wscript
> @@ -452,6 +452,10 @@ return acl_get_perm_np(permset_d, perm);
>
> if conf.CHECK_FUNCS('dirfd'):
> conf.DEFINE('HAVE_DIRFD_DECL', 1)
> + conf.DEFINE('HAVE_DIRFD', 1)
> +
> + if conf.CHECK_FUNCS('fstatat'):
> + conf.DEFINE('HAVE_fstatat', 1)

Here's a typo HAVE_fstatat => HAVE_FSTATAT.

But also notice that the additional conf.DEFINE() calls are not needed.

conf.CHECK_FUNCS() calls conf.CHECK_FUNC() which uses define='HAVE_%s' %
f.upper()
as the default define.

metze

signature.asc
0 new messages