tdb: suppress record write locks when allrecord lock is taken.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 00:15:26 +0000 (10:45 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 00:15:26 +0000 (10:45 +1030)
commitcaaf5c6baa1a4f340c1f38edd99b3a8b56621b8b
tree10f06ea7ed2c67440fa91899825dce445932ecfd
parent9341f230f8968b4b18e451d15dda5ccbe7787768
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.  This is now bad: it causes us to punch a hole
in the allrecord lock when we release the write record lock.  Make this
consistent: *no* record locks of any kind when the allrecord lock is
taken.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb/common/lock.c