unix_convert() and amount of stat() calls
Jeremy Allison
jra at samba.org
Wed Sep 8 15:58:10 MDT 2010
On Tue, Sep 07, 2010 at 09:40:17PM +0200, Stefan (metze) Metzmacher wrote:
> Hi Jeremy,
>
> what's the reason that we loop over the components
> from the root to the leaf, when checking them?
>
> Can't we start with the last component?
> At least if it's related to a wildcard search.
>
> Maybe we only need to check the last 2 components,
> unless the name is mangled?
>
> The problem I want to solve in this branch:
> http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/samba-3.4.7-ctdb-10
> is this:
>
> FindFirst with 'path\to\some\dir\with\files\*'
>
> triggers the following stat calls
>
> path\to\some\dir\with\files\* => ENOENT (this should be already solved
> with my patches)
> path\
> path\to\
> path\to\some\
> path\to\some\dir\
> path\to\some\dir\with\
> path\to\some\dir\with\files\
> path\to\some\dir\with\files\* => ENOENT
Ok, I have a patch for this. Give me a min and I'll post it.
Jeremy.
More information about the samba-technical
mailing list