process shared robust mutexes for tdb
Rusty Russell
rusty at samba.org
Tue Mar 26 17:29:52 MDT 2013
Volker Lendecke <Volker.Lendecke at SerNet.DE> writes:
> On Tue, Mar 26, 2013 at 03:21:42PM +1030, Rusty Russell wrote:
>> I think we can do better: why not always hold the ACTIVE_LOCK (fcntl
>> lock) if TDB_MUTEX_LOCKING? If they *don't* specify CLEAR_IF_FIRST, and
>> we get a write lock, then reset the mutexes (in theory we could resize
>> them at this point if we needed to, too).
>
> I don't think that's safe. You can't hold the ACTIVE_LOCK
> from all openers, we did that initially and killed the
> linked list flock implementation everywhere.
Ah, I forgot that we are still using fcntl locks for the per-record
locks. Otherwise it's only slow down open, which is probably
acceptable.
I'll have to think harder on this one. Or perhaps the answer is that
when I steal your code for ntdb, we can make it general (no per-record
locks there!) :)
Thanks,
Rusty.
More information about the samba-technical
mailing list