What was/is the purpose of the getwd cache?

Andreas Schneider asn at samba.org
Wed Jun 13 03:42:57 MDT 2012

On Tue 12.Jun.12 14:00, Jeremy Allison wrote:
>On Tue, Jun 12, 2012 at 01:55:36PM -0700, Richard Sharpe wrote:
>> Hi folks,
>> What happens if I set 'getwd cache = no'?
>smbd will stop using the getwd cache. See this comment
>in the code:
>        /*
>         * We don't have the information to hand so rely on traditional
>         * methods. The very slow getcwd, which spawns a process on some
>         * systems, or the not quite so bad getwd.
>         */
>Probably these days getwd is reasonably fast. But this is
>an *OLD* optimization.
This raises the question for which systems it is still needed and can we
get rid of it for 4.0 :)

     -- andreas

More information about the samba-technical mailing list