[Samba] A samba locking question

David Collier-Brown David.Collier-Brown at Sun.COM
Wed Feb 4 19:38:43 GMT 2004


Andrew Bartlett wrote:

> fcntl() locks are advisory.  I'll leave it to others to comment on how
> Samba interacts with various combinations of locking, opens (which may
> not request a lock) etc.   However, samba 3.0 ships with 'strict locking
> = yes' as a default to better cover this case.

	Strict locking = yes may be overkill, as in this
	vase it's Samba who's doing the locking on both nodes,
	and can be trusted to "do it right".

	It may be overkill anyway, as the
	few programs that bother to take fcntl locks
	either
	- lock on open/close, and so lock the whole file
	- lock fixed-length records when needed
	And either of these should work cleanly with
	Samba. It's the erroneous programs which ignore
	lock failures, and the programs which don't take
	locks that are the pain.


	Much the same problem as when updating files with
	cp on Unix while some unsuspecting PC has it oplocked (;-))

--dave
-- 
David Collier-Brown,       | Always do right. This will gratify
Sun Microsystems,          | some people and astonish the rest.
Toronto, Ontario,          |                      -- Mark Twain
(905) 415-2849 or x52849   | davecb at canada.sun.com




More information about the samba-technical mailing list