tdb: be more careful on 4G files.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 19 Dec 2011 05:17:50 +0000 (15:47 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 19 Dec 2011 06:52:01 +0000 (07:52 +0100)
commitb64494535dc62f4073fc6302847593ed6e6ec38b
treefc81a835f7f0c559b1d85fb3ebc33b0f9e4e42b0
parent6260d8c29b4828511ecd1c3fc176612e0a0c73ce
tdb: be more careful on 4G files.

I came across a tdb which had wrapped to 4G + 4K, and the contents had been
destroyed by processes which thought it only 4k long.  Fix this by checking
on open, and making tdb_oob() check for wrap itself.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Dec 19 07:52:01 CET 2011 on sn-devel-104
lib/tdb/common/check.c
lib/tdb/common/freelist.c
lib/tdb/common/io.c
lib/tdb/common/open.c
lib/tdb/common/tdb_private.h
lib/tdb/common/transaction.c