Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This clarifies the code a little, but also provides a more explicit
mechanism which can be used to debug error handling (by introducing
tdb_err_t and making it a pointer type).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit afa6d57b7d93fe4675a952f556eb462951baa257)
|
|
This reports errors if we fork() while holding a lock, or misuse a tdb
which we have dual-opened.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit bef6f1b02e95370ecb2cb44be87c82afc9cb74b2)
|
|
Switch on the TDB_VERSION1 flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit ceb2f3eacbad917ee990afbc3dd800bfb0607887)
|
|
Finally, we gut tdb1_open() to the tdb1-specific parts, and call it
from tdb_open if they specify the TDB_VERSION1 flag or the version is
a TDB1.
We also unify tdb_close(), based on the TDB_VERSION1 flag.
Note that tdb_open(TDB_VERSION1) will fail on an existing tdb if it's
a TDB2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit c8c3b3568677e8b0105f84e4ab068c580faf4591)
|
|
This means they will use the TDB_ATTRIBUTE_FLOCK functions, and get automatic
reopen support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit fbad02b680b6cbc33ae305ae1cbcdead4eedc7b1)
|
|
You can only unset it if the TDB was originally opened O_RDWR.
Also, cleaned up error handling in tdb_allrecord_lock() so we only get
one log message on a r/o database.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit b87e14495d5b07e1b247218a72329f10ecb3da7f)
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|