Latest leases patchset - getting there !

Jeremy Allison jra at samba.org
Tue Nov 18 15:24:03 MST 2014


On Tue, Nov 18, 2014 at 03:32:01AM +0100, Stefan (metze) Metzmacher wrote:
> >>
> >> Do we have an oplock related test for this already?
> > 
> > Yeah, we do have some SMB2 oplock + byte range
> > lock tests, but I don't think it checks this
> > specific case.
> 
> We also need tests for the
> contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_WINDOWS_BRL)
> case.
> 
> Should this break also a "RW" or "RWH leases?
> 
> What happens for "R" and "RH" leases?
> 
> Does it break its own lease?

I'm pretty sure I've discovered a bug
in Windows w.r.t. leasing and byte
range locks.

The spec says:

-----------------------------------------------------
3.3.1.4 Algorithm for Leasing in an Object Store

READ caching permits the SMB2 client to cache data read from the object. Before processing
one of the following operations from a client with a different ClientId, the object store MUST
request that the server revoke READ caching. The object store is not required to wait for
acknowledgment:
READ caching on a file:
	The file is opened in a manner that overwrites the existing file.
	Data is written to the file.
	The file size is changed.
	A byte range lock is requested for the file.
-----------------------------------------------------

I have some wonderful test code in smbtorture
that shows Win2K12 doesn't revoke READ leases
when I send a byte range lock from a differing
ClientGUIDs :-).

I will post it shortly as part of the patchset.

Oh well - I think I'm going to set this as "Windows
specific behavior" :-).

Jeremy.


More information about the samba-technical mailing list