]> git.ozlabs.org Git - ccan/commit
tdb: suppress record write locks when allrecord lock is taken.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 23 Feb 2010 22:22:44 +0000 (08:52 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 23 Feb 2010 22:22:44 +0000 (08:52 +1030)
commitf4ed21278307cb2af87f811c3f509d11a4221d2f
tree207707658b29cd350f66d417c3753de4962d4b36
parentc4a9fd1b01822e75da853d3f3229de5d35409e31
tdb: suppress record write locks when allrecord lock is taken.

Records themselves get (read) locked by the traversal code against delete.
Interestingly, this locking isn't done when the allrecord lock has been
taken, though the allrecord lock until recently didn't cover the actual
records (it now goes to end of file).

The write record lock, grabbed by the delete code, is not suppressed by
the allrecord lock, which causes us to punch a hole in that lock when we
release the write record lock.  Make this consistent: *no* record locks
of any kind when the allrecord lock is taken.
ccan/tdb/lock.c