[Samba] smb locks

Jeremy Allison jra at samba.org
Tue Jun 19 10:45:47 MDT 2012

On Tue, Jun 19, 2012 at 03:50:07PM +0530, Rajesh Ghanekar wrote:
> Hi,
>    I see samba with ctdb locking has following mapping when
> kernel oplocks = yes.
>    share mode reservations = flock(2)
>    posix byte range locking = fcntl(2)
>    SMB locks (mandatory) = ctdb using brlock.tdb
>    oplocks = fcntl(2) using F_SETLEASE
>   Am I correct or I am missing something? I hope only SMB range
> locks are implemented with tdb, all else are being used from filesystem.
> What happens if flock or fcntl returns -ENOTSUPP, will samba start
> using other tdb files (locking.tdb) for that or will it say "not supported"
> to CIFS client?

The flock error will be ignored, if fcntl returns -ENOTSUPP
then that would be an error - you need to set "posix locking = no"
to get smbd to ignore fcntl locks on exported shares.


More information about the samba mailing list