]> git.ozlabs.org Git - ccan/commit
tdb2: be more careful on 4G files (tdb1).
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 21 Dec 2011 05:44:51 +0000 (16:14 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 21 Dec 2011 05:44:51 +0000 (16:14 +1030)
commita3606bbd6ac38deb365b1c6c7f738ef19bd3df1c
treeb03a706f5e88fe6e34ec55c39b939c5c4a27e36e
parentc46e5c375d5f5e3187034687d241ab6da6eb6205
tdb2: be more careful on 4G files (tdb1).

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>
(Ported from tdb1 SAMBA commit b64494535dc62f4073fc6302847593ed6e6ec38b)
ccan/tdb2/tdb1_check.c
ccan/tdb2/tdb1_freelist.c
ccan/tdb2/tdb1_io.c
ccan/tdb2/tdb1_private.h
ccan/tdb2/tdb1_transaction.c