tdb: fix tdb_check() on read-only TDBs to actually work.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Sep 2010 10:28:23 +0000 (19:58 +0930)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 8 Oct 2010 01:53:37 +0000 (12:53 +1100)
commit30300b3a4b26ad2c8c5cf89ef7645f32878773e0
tree60e7aecbc49d418e311125d41efd0424bd78773e
parentb765f97c81dac6895a14fe21aab12666786cfd5d
tdb: fix tdb_check() on read-only TDBs to actually work.

Commit bc1c82ea137 "Fix tdb_check() to work with read-only tdb databases."
claimed to do this, but tdb_lockall_read() fails on read-only databases.

Also make sure we can still do tdb_check() inside a transaction (weird,
but we previously allowed it so don't break the API).

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