From: Rusty Russell Date: Thu, 21 Apr 2011 01:46:35 +0000 (+0930) Subject: tdb2: handle non-transaction-page-aligned sizes in recovery. X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=ba7740e689b5791d79b95d2c5345870f9c29fb71;hp=ba7740e689b5791d79b95d2c5345870f9c29fb71;p=ccan 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). ---