tdb: make check more robust against recovery failures.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Sep 2010 10:25:26 +0000 (19:55 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 7 Oct 2010 04:35:55 +0000 (15:05 +1030)
commitb4162a95ff9ae28cda8d9c76c51c9480104517a7
tree5b8e9aabc4e2e1602497550c082927a3a65a3ffc
parent3a033156c48d821d48fd18f12c3b0ac14bbddc93
tdb: make check more robust against recovery failures.

We can end up with dead areas when we die during transaction commit;
tdb_check() fails on such a (valid) database.

This is particularly noticable now we no longer truncate on recovery;
if the recovery area was at the end of the file we used to remove it
that way.

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