Help!

[Samba] smb locks

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Samba RSS
Next:  Bug#678109: mlterm.desktop is not 100% compatible..  
Author Message
Rajesh Ghanekar
External


Since: Jun 19, 2012
Posts: 2



PostPosted: Tue Jun 19, 2012 7:10 am    Post subject: [Samba] smb locks
Archived from groups: linux>samba (more info?)


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
Back to top
Rajesh Ghanekar
External


Since: Jun 19, 2012
Posts: 2



PostPosted: Tue Jun 19, 2012 8:10 am    Post subject: Re: [Samba] smb locks [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 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?
>
> Thanks,
> Rajesh
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Back to top
Jeremy Allison
External


Since: Dec 13, 2004
Posts: 588



PostPosted: Tue Jun 19, 2012 2:10 pm    Post subject: Re: [Samba] smb locks [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Samba All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum