]> git.ozlabs.org Git - ccan/commit - ccan/tdb2/free.c
tdb2: stricter ordering on expansion lock
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 23 Nov 2010 01:43:59 +0000 (12:13 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 23 Nov 2010 01:43:59 +0000 (12:13 +1030)
commit554f38560bfd9a603b5d95fb1a656f080617534b
tree4d754aa3cf774c446526b9f4ea26e0c5af267b7e
parent6520c8318b9b8f2d92ae4b9f062788b7e4035aac
tdb2: stricter ordering on expansion lock

It's problematic for transaction commit to get the expansion lock, but
in fact we always grab a hash lock before the transaction lock, so it
doesn't really need it (the transaction locks the entire database).

Assert that this is true, and fix up a few lowlevel tests where it wasn't.
ccan/tdb2/free.c
ccan/tdb2/test/run-02-expand.c
ccan/tdb2/test/run-30-exhaust-before-expand.c
ccan/tdb2/transaction.c