Just-in-time mounts when following symlinks

Jeremy Allison jallison at whistle.com
Thu Jun 4 21:13:57 GMT 1998

Albert Chin-A-Young wrote:
> Ok, following discussions with Paul Epp <epp at clrtech.bc.ca>, there are
> a total of three ways to solve this problem:
>         1. Add the following options to smb.conf:
>                 jit symlinks = yes/no
>                 file symlinks = [pointer to file with REs]
>                 directory symlinks = [pointer to file with REs]
>            Then wrap calls to stat() accordingly so that symbolic
>            links in a particular directory are treated as files
>            or directories and force lstat() on them. The
>            'jit symlinks' stands for 'just-in-time symlinks' and
>            would enable this feature. This would be a general-
>            purpose mechanism for anyone with trees of symbolic
>            links.

What are the speed considerations of this ?

The stat system call is one of the most common within
Samba, in fact one of the optimizations (I will get
around to one day :-) would be to optimize out as
many of these stat calls as possible, ensuring they
are only done once per pathname.

My fear with the solution you propose is that it will
be horribly slow, due to the extra overhead in processing 
stat calls.

> What do you all think? Paul is already coding up solution #1 and
> will be done shortly. I have tested solution #2 and it works just
> fine (though we're running AMD here).

I'd be interested in the code, although I don't want
to commit to including it in the master sources (except
as a compile-time option) until some benchmarks have been


	Jeremy Allison,
	Samba Team.

Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list