posix locking and the brlock database

Jeremy Allison jra at samba.org
Sat May 19 20:53:02 GMT 2007


On Sat, May 19, 2007 at 11:23:45AM -0700, Jeremy Allison wrote:
> On Sat, May 19, 2007 at 07:43:53PM +1000, tridge at samba.org wrote:
> > 
> > While the file is locked, a windows client tries to get the lock. It
> > will check the posix lock in brlock.c, and see that it can't get the
> > lock, so it puts in a pending lock entry in the brlock.tdb record for
> > that file.
> > 
> > Then the NFS client or local unix application releases the byte range
> > lock. What triggers the retry of the pending lock? We don't get any
> > notification from the kernel, and we don't retry internally.
> 
> Ah, phew. You had me worried there :-). Yes we do retry internally,
> just not as often as we used to :-).

Actually, whilst porting my patch to SAMBA_3_0 I noticed
this wasn't being done correctly in that branch due to
the blocking timeouts being done entirely by events.

The patch I'm checking in will fix this with a 10sec
timeout for both the SAMBA_3_0 event based code and
the SAMBA_3_0_25/26 select based code.

Jeremy.


More information about the samba-technical mailing list