byte range locking

Jeremy Allison jeremy at valinux.com
Wed Jan 12 18:46:48 GMT 2000


Jeremy Allison wrote:
> 
> Andrew Tridgell wrote:
> >
> > The new lock system is based on a tdb database shared between all smbd
> > processes. Once its in place I can start on removing some of those
> > ugly hacks we needed with posix locks.
> 
> I don't think you can entirely remove all the hacks as we still
> need to set POSIX lock ranges on the extents locked in Samba
> (mangling as neccessary).
> 
> In order to share data at all in a mixed Windows/UNIX
> environment the SMB locks need to exist as best as possible
> as POSIX locks also.

Actually, thinking about this some more (and following up
on my own email :-) this isn't really a problem.

Once all the tdb lock record processing is done, with
the tdb database still locked, we attempt a mangled POSIX
lock as best we can and then roll back on a fail.

This will actually simplify the locking code processing
immensely, as the nasty mangling details can be confined
to one place.

Blocking and timeout locks will be fun though, but can
still be handled in the same way we do currently, with
a timer tick function.

Hmmmm. This should work....

Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba-technical mailing list