Rajesh Ghanekar | 19 Jun 2012 12:20
Picon

smb locks

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?

Thanks,
Rajesh
--

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Rajesh Ghanekar | 19 Jun 2012 12:57
Picon

Re: smb locks

Some corrections, hence resending:

Hi,
I see "samba with ctdb" locking has following mappings when
enabled with "kernel oplocks = yes".

   share mode reservations = flock(2), if not supported by filesystem
use ctdb with locking.tdb
   POSIX byte range locks = fcntl(2), if not supported by filesystem,
deny locking
   SMB byte range locks (mandatory) = use ctdb with brlock.tdb, also
map to filesystem's fcntl(2)
   oplocks = fcntl(2) using F_SETLEASE, if not supported by filesystem
use ctdb with locking.tdb

  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 ctdb with tdb files (locking.tdb) for that or will it say "not supported"
to CIFS client?

Thanks,
Rajesh

On Tue, Jun 19, 2012 at 3:50 PM, Rajesh Ghanekar <rajeshsg <at> gmail.com> wrote:
> Hi,
>   I see samba with ctdb locking has following mapping when
> kernel oplocks = yes.
>
>   share mode reservations = flock(2)
(Continue reading)

Jeremy Allison | 19 Jun 2012 18:45
Picon
Favicon

Re: smb locks

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.

Jeremy.
--

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Gmane