summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/tdb/include/tdb.h
Commit message (Collapse)AuthorAgeFilesLines
* tdb: Sync to tdb 1.2.11 from upstreamAmitay Isaacs2013-05-291-0/+22
| | | | (This used to be ctdb commit bb3a32ec055432afc7225c9fd7504fb187694bda)
* lib/tdb: Sync tdb from samba git treeAmitay Isaacs2012-04-131-96/+756
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)
* tdb: expose transaction lock infrastructure for ctdbRusty Russell2011-01-181-0/+4
| | | | | | | | | tdb_traverse_read() grabs the transaction lock. This can cause ctdbd (which uses it) to block when it should not; expose mark and normal variants of this lock, so ctdbd's child (the recovery daemon) can acquire it and the ctdbd parent can mark it was held. (This used to be ctdb commit d09fa845bd848d04507853809acf42e0471b44bf)
* tdb: TDB_INCOMPATIBLE_HASH, to allow safe changing of default hash.Rusty Russell2010-10-071-0/+1
| | | | | | | | | | | | | | | | | | This flag to tdb_open/tdb_open_ex effects creation of a new database: 1) Uses the Jenkins lookup3 hash instead of the old gdbm hash if none is specified, 2) Places a non-zero field in header->rwlocks, so older versions of TDB will refuse to open it. This means that the caller (ie Samba) can set this flag to safely change the hash function. Versions of TDB from this one on will either use the correct hash or refuse to open (if a different hash is specified). Older TDB versions will see the nonzero rwlocks field and refuse to open it under any conditions. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit dd86b24ae5307fe09d4ae22b7070d747013a2b07)
* tdb: add Bob Jenkins lookup3 hash as helper hash.Rusty Russell2010-10-071-0/+1
| | | | | | | | | | | | This is a better hash than the default: shipping it with tdb makes it easy for callers to use it as the hash by passing it to tdb_open_ex(). This version taken from CCAN and modified, which took it from http://www.burtleburtle.net/bob/c/lookup3.c. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 58c9d90c758aa7c062d84ab97f62947190526356)
* tdb: define _PUBLIC_ so we can compile tdb.Rusty Russell2010-04-221-0/+5
| | | | | | | | | | | The Samba tree defines _PUBLIC_ (and _PRIVATE_) for libraries to control visibility. The last commit absorbed this from their tdb, but we need to #define to stub it out since ctdb doesn't use it (and doesn't need to: we only use tdb internally). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 54bee0ec670724c337b882e7dda3e999ffa80691)
* tdb: update tdb ABI to use hide_symbols=TrueAndrew Tridgell2010-04-221-65/+64
| | | | | | | | | | | | | | | | | | We now use -fvisibilty=hidden to hide symbols from outside the tdb shared library. This also moved tdb_transaction_recover() into the tdb_private.h header, as it should never have been a public API. For that reason we are changing the version number. We're only doing a minor version increment as it is extremely unlikely that anyone was actually using tdb_transaction_recover() as its locking requirements were rather unusual. Pair-Programmed-With: Rusty Russell <rusty@samba.org> (Imported from commit 773a8afbba27a5e2e48577100f3ca9873b506615) (This used to be ctdb commit e174dc084f11db0eb239b643affef2c02c711b1c)
* tdb: Add a non-blocking version of tdb_transaction_startVolker Lendecke2010-04-221-0/+1
| | | | | | (Imported from commit 261c3b4f1beed820647061bacbee3acccbcbb089) (This used to be ctdb commit 87ced00d6d98be4a34719af58694e7c940b4dd68)
* tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behaviorStefan Metzmacher2009-12-161-0/+1
| | | | | | | | | | | | | | | We need to keep TDB_ALLOW_NESTING as default behavior, so that existing code continues to work. However we may change the default together with a major version number change in future. metze (cherry picked from samba commit 3b9f19ed919fef2e88b2f92ae541e07bc7379cd1) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit c1c0ede32dc00ed619d1cf5fda40a9de43995f3a)
* lib/tdb: add tdb_check()Rusty Russell2009-12-161-0/+3
| | | | | | | | | | | | | ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with loops in their hash chains. tdb_check() provides this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from samba commit 022b4d4aa6861c1e3e6d76484d92555221cb6d14) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit df1a3ce0380fa9d8722b2f9b16f65557095e4c83)
* lib/tdb: sync build files from samba masterStefan Metzmacher2009-12-161-0/+1
| | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 1d5c5a221c28f1dc652a80ed516a0f18ba588d9f)
* lib/tdb: wean off TDB_ERRCODE.Rusty Russell2009-12-161-2/+0
| | | | | | | | | | | | | | | It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch. In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in the header is useless (the struct tdb_context isn't defined, so it's doubly useless). Also, we should never set errno, as io.c was doing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cherry picked from samba commit b77f41d58b05101e02d8ac0e54cb0e30807d89c2) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit a6620f6e74aadc708395b21b42303d1082192fcc)
* Port from SAMBA ctdb: commit 936d76802f98d04d9743b2ca8eeeaadd4362db51 ↵Rusty Russell2009-08-041-1/+4
| | | | | | | | | | | | | | Author: Andrew Tridgell <tridge@samba.org> Date: Tue Dec 16 14:38:17 2008 +1100 imported the tdb_repack() code from CTDB The tdb_repack() function repacks a TDB so that it has a single freelist entry. The file doesn't shrink, but it does remove all freelist fragmentation. This code originated in the CTDB vacuuming code, but will now be used in ldb to cope with fragmentation from re-indexing (This used to be ctdb commit fe3ceb101a5a9c336973c2c6c31406bd8181c2fe)
* Port from SAMBA tdb:Rusty Russell2009-08-041-0/+1
| | | | | | | | | | | | | | | | commit b90863c0b7b860b006ac49c9396711ff351f777f Author: Howard Chu <hyc@highlandsun.com> Date: Tue Mar 31 13:15:54 2009 +1100 Add tdb_transaction_prepare_commit() Using tdb_transaction_prepare_commit() gives us 2-phase commits. This allows us to safely commit across multiple tdb databases at once, with reasonable transaction semantics Signed-off-by: tridge@samba.org (This used to be ctdb commit 4c3dac215a088947f645f727343997f5d47e3260)
* New attempt at TDB transaction nesting allow/disallow.Ronnie Sahlberg2009-05-251-1/+3
| | | | | | | | | | Make the default be that transaction is not allowed and any attempt to create a nested transaction will fail with TDB_ERR_NESTING. If an application can cope with transaction nesting and the implicit semantics of tdb_transaction_commit(), it can enable transaction nesting by using the TDB_ALLOW_NESTING flag. (This used to be ctdb commit 3e49e41c21eb8c53084aa8cc7fd3557bdd8eb7b6)
* Revert "add TDB_NO_NESTING. When this flag is set tdb will not allow any ↵Ronnie Sahlberg2009-05-251-1/+0
| | | | | | | | nested transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones." This reverts commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec. (This used to be ctdb commit f1c6f7dd47bb1081781c0a0d567a92bbbc0aa5d5)
* add TDB_NO_NESTING. When this flag is set tdb will not allow any nested ↵Ronnie Sahlberg2009-04-261-0/+1
| | | | | | transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones. (This used to be ctdb commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec)
* merge from samba4Andrew Tridgell2008-01-181-4/+3
| | | | (This used to be ctdb commit 21245b894b32f232251fd7c0e2fbfd073fb10514)
* fixed the bug that caused tdbtorture to failAndrew Tridgell2008-01-141-0/+1
| | | | | | It was an error in the new transaction code (This used to be ctdb commit 27f0dfdfb93d92859de3cbbd3874cfb38c13a169)
* added two new ctdb commands:Andrew Tridgell2008-01-081-0/+1
| | | | | | | | | | ctdb vacuum : vacuums all the databases, deleting any zero length ctdb records ctdb repack : repacks all the databases, resulting in a perfectly packed database with no freelist entries (This used to be ctdb commit 3532119c84ab3247051ed6ba21ba3243ae2f6bf4)
* - added tdb_add_flags() and tdb_remove_flags()Andrew Tridgell2008-01-061-0/+3
| | | | | | | | - make freelist merging more paranoid - fixed TDB_DATA_STAART() (broken by earlier commit) (This used to be ctdb commit c3be8eb7d1ca316111ec51f45dbca2fa5609cf93)
* merge from Samba4Andrew Tridgell2008-01-051-0/+3
| | | | (This used to be ctdb commit 9aed7a1d065272c2e5b54872228a73f37664b526)
* update lib/tdb from samba4Andrew Tridgell2007-07-101-2/+1
| | | | (This used to be ctdb commit 96a39ccee38bcfd64d614fe4670766e59ef246b6)
* update lib/replace from samba4Andrew Tridgell2007-07-101-1/+1
| | | | (This used to be ctdb commit f0555484105668c01c21f56322992e752e831109)
* added _mark calls for tdb_lockallAndrew Tridgell2007-05-121-0/+2
| | | | (This used to be ctdb commit e59134fd2af67c746b907c23fdcde2eccbbe17cf)
* added nonblocking varients of the two lockall functions to tdbAndrew Tridgell2007-05-101-0/+2
| | | | (This used to be ctdb commit 2e99fa41ce01fa282bc0f3244ca42a78173743ed)
* added tdb_chainlock_mark() call, which can be used to mark a chain locked ↵Andrew Tridgell2007-05-051-0/+2
| | | | | | without actually locking it. This will be used to guarantee forward progress in the ctdb non-blocking lockwait code (This used to be ctdb commit 2af98c3418496b39106c7282f550049ec8239657)
* added seqnum propogation code to ctdbAndrew Tridgell2007-05-041-0/+1
| | | | (This used to be ctdb commit be2572b1b09eaaa1ea6a726d60f16996f9407d13)
* added a tdb_enable_seqnum() functionAndrew Tridgell2007-05-041-0/+1
| | | | (This used to be ctdb commit 1f89da231c6637e339d5da156d6a48340706fe61)
* added a tdb_chainlock_nonblock() call to tdbAndrew Tridgell2007-04-161-0/+1
| | | | (This used to be ctdb commit 6587bdca71d97709c9271a73aea0be5a2a35f399)
* merge local copy of tdb from samba4 tdbAndrew Tridgell2007-04-161-1/+6
| | | | (This used to be ctdb commit d4619ce98ce44acaebeb6ae9c516a7917bf4e27f)
* added copies of libs so can be built standaloneAndrew Tridgell2007-01-251-0/+147
(This used to be ctdb commit 0bf6e6cb371bb946ea8cc1d8c7a23a41ea715832)