[Samba] A samba locking question

Andrew Bartlett abartlet at samba.org
Sat Jan 31 00:24:32 GMT 2004


On Thu, 2004-01-29 at 23:55, Patrik Gustavsson wrote:
> Hi,
> 
> Maybe this is a stupid question, but any way
> 
> Will samba use fcntl locking if level 1 and 2 oplocks is
> disabled and samba is not compiled with spin-locks enabled ?
> 
> I am using Samba on solaris

Samba uses fcntl() locking in two places.  Firstly, it is used to mirror
SMB locks, asked for by the client.  Secondly they are used to mediate
access to tdbs.

Spinlocks are an alternative (if much less reliable) method for tdb
mediation.  

oplocks do not override fcntl locks - but clients that have successfully
gained an oplock might not ask for an SMB lock, and therefore Samba
might not attempt to gain the matching fcntl() lock.

The nasty performance issues in Solaris are due to bad fcntl() lock
contention performance in Samba's TDB access.  

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20040131/22c13fe2/attachment.bin


More information about the samba mailing list