[Samba] A samba locking question

Jeremy Allison jra at samba.org
Tue Feb 10 18:18:35 GMT 2004


On Tue, Feb 10, 2004 at 09:39:01AM +0100, Patrik Gustavsson wrote:
> Well, you should know.
> 
> But if Samba is doing byte ranged lock using fcntl, then
> I don't understand why my tests failed.
> 
> The first test I did was:
> 
> I simulated a NFS client and did byte range lock on a file,
> a document in this case 8K in size, and tried to open that from
> client using Samba and it failed becuse is was locked.
> 
> The second test I did was:
> 
> When  a client opened the file using samba, with a
> DENY_WRITE lock (output from smbstatus) and I used the same simulated
> NFS client that did a byte range write lock using fcntl() on that
> document.
> I would assume that the byte range lock would fail, but it didn't it 
> succeeded.
> 
> That surprised me.

You're confusing share modes with byte range locks. Read up on share
modes - smbstatus doesn't report byte range locks, only share modes.

Until you understand the difference we're not really communicating :-). At all :-).

Jeremy.


More information about the samba mailing list