Byte range locking beyond 64 bits

Jeremy Allison jra at samba.org
Thu Dec 11 00:19:56 GMT 2008


On Wed, Dec 10, 2008 at 03:59:18PM -0800, Zack Kirsch wrote:
> Hi Jeremy,
> 
>  
> 
> While trying to make sense of the Windows byte range locking semantics which go
> beyond 64 bits, I remembered that MS passed around a ?File System Behavior?
> document at the MS Plugfest in June.  In that document they explicitly say
> ?ranges that extend past the 64 bit limit (that is, adding offset + length
> overflows 64 bits) must not be used as Windows is not prepared to deal with
> them and they lead to highly unexpected and inconsistent behavior. This is also
> fixed in Windows 7, which will ensure locks in those ranges will always fail,
> with STATUS_INVALID_LOCK_RANGE?.  This makes sense, because the semantics
> beyond 64 bits are pretty silly; they conflict with ?exact match? semantics for
> the range start and length.
> 
>  
> 
> Given that they?re admitting to this being a Windows bug and giving us proper
> semantics, are you okay with me replacing the following check from brl_overlap
> () to return STATUS_INVALID_LOCK_RANGE?

Sounds ok to me, but I'd like to see the exact patch
first please.

I think Volker and tridge would also like to review,
as this is something both of them have looked at also.

Jeremy.


More information about the samba-technical mailing list