ntdb: make sure file is always a multiple of PAGESIZE (now NTDB_PGSIZE)
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 18 Jun 2012 13:00:29 +0000 (22:30 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 19 Jun 2012 03:38:06 +0000 (05:38 +0200)
commit9396757676c304398a3e94ad01f2657e667b113c
treeca55222ca49c2d886f8717be73f3c403ed1a37c2
parentdd4eed47591eeb6aafe5782690c1b550d0e3ebc4
ntdb: make sure file is always a multiple of PAGESIZE (now NTDB_PGSIZE)

ntdb uses tdb's transaction code, and it has an undocumented but implicit
assumption: that the transaction recovery area is always aligned to the
transaction pagesize.  This means that no block will overlap the recovery
area.

This is maintained by rounding the size of the database up, so do the same
for ntdb.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/ntdb/free.c
lib/ntdb/io.c
lib/ntdb/private.h
lib/ntdb/test/run-30-exhaust-before-expand.c
lib/ntdb/test/run-64-bit-tdb.c
lib/ntdb/transaction.c