]> git.ozlabs.org Git - ccan/commit
tdb2: handle non-transaction-page-aligned sizes in recovery.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 21 Apr 2011 01:46:35 +0000 (11:16 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 21 Apr 2011 01:46:35 +0000 (11:16 +0930)
commitba7740e689b5791d79b95d2c5345870f9c29fb71
tree6a0dc22fd4577daf2a4078cd5f826a25f63b189e
parent1fa54dfd198611a15f4c701a0525ea4ac2af4343
tdb2: handle non-transaction-page-aligned sizes in recovery.

tdb1 always makes the tdb a multiple of the transaction page size,
tdb2 doesn't.  This means that if a transaction hits the exact end of
the file, we might need to save off a partial page.

So that we don't have to rewrite tdb_recovery_size() too, we simply do
a short read and memset the unused section to 0 (to keep valgrind
happy).
ccan/tdb2/transaction.c