Latest leases patchset - getting there !

Stefan (metze) Metzmacher metze at samba.org
Tue Nov 18 05:58:48 MST 2014


Am 18.11.2014 um 07:20 schrieb Jeremy Allison:
> On Tue, Nov 18, 2014 at 02:48:26AM +0100, Stefan (metze) Metzmacher wrote:
>>>
>>> OK, I don't understand what you're asking for here (sorry).
>>>
>>> Right now the test does:
>>>
>>> open LEASE1 -> RWH
>>> 	        <- RWH (H1)
>>> open LEASE2 -> RWH
>>> 		<- Break to RH on LEASE1
>>> ... timout...
>>> 		<- RH (H2)
>>> Ack break to RH ->
>>> 		<- NT_STATUS_UNSUCCESSFUL
>>> Write on H1 ->
>>> 		<- Break to NONE on LEASE2
>>>
>>
>> The following in addition:
> 
> OK - here is the updated timeout test that does the
> changes you requested:
> 
>> Write on H2 ->
>>
>>                 <- Break to NONE on LEASE1?
> 
> Problem - Windows (W2K8) does NOT break to none on LEASE1
> here. That just seems wrong to me. I'll test
> with W2K12 when I get into work tomorrow.
> 
> Currently I've added code that does the following
> to cope with the difference.
> 
>         if (TARGET_IS_SAMBA3(tctx)) {
>                 CHECK_BREAK_INFO("RH", "", LEASE1);
>         } else {
>                 CHECK_NO_BREAK(tctx);
>         }
> 
> But not breaking H1,LEASE1 to none on a write
> on H2,LEASE2 seems like it could lead to data
> corruption on Windows to me.
> 
> My understanding is that H1,LEASE1 should be in a RH state
> if the reply to H2,LEASE2 came back with RH.

We can just ask the server about the current state of the lease,
by doing an open with SMB2_LEASE_NONE, the response will give us the
current state, as it will never downgrade.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141118/0b6261a2/attachment.pgp>


More information about the samba-technical mailing list