Re: Small fix to remove invalid byte range locks On Fri, Jun 15, 2007 at 04:34:30PM -0700, Zack Kirsch wrote:
> Hi Volker and samba-tech,
> 
>  
> 
> This is a small bug that we noticed while working on some byte range
> locking code. This patch sets the modified bit on the byte_range_lock
> struct, if validate_lock_entries() has changed the pplocks parameter
> passed in (i.e. removed some invalid locks.)  With the modified bit set,
> the byte_range_lock_destructor() should commit the modifications, by
> calling tdb_store().
> 
>  
> 
> You could argue that perhaps this is done by design, but it seems that
> if Samba is going to go through the effort to find invalid byte range
> locks, it should remove them as well.
> 
>  
> 
> As a warning, I haven't had time to test this code path. The bug was
> originally found and fixed by Spie Rudoff (spie_rudoff@isilon.com).

Perfectly correct - thanks for catching this. That was the original
intent behind that code but somehow the modified flag didn't get set.

This should fix some outstanding bugs I'm aware of (but could not
previously reproduce).

Thanks a *lot*.

Jeremy.

