summaryrefslogtreecommitdiff
path: root/lib/tdb/common/tdb.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-20tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behaviorStefan Metzmacher1-0/+30
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
2009-10-25tdb: detect tdb store of identical records and skipAndrew Tridgell1-0/+20
This can help with ldb where we rewrite the index records
2009-10-23tdb: rename 'struct list_struct' into 'struct tdb_record'Stefan Metzmacher1-15/+15
metze
2009-10-22lib/tdb: wean off TDB_ERRCODE.Rusty Russell1-3/+6
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>
2009-10-22lib/tdb: TDB_TRACE support (for developers)Rusty Russell1-23/+209
When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb operations is enabled. This can be replayed using "replay_trace" from http://ccan.ozlabs.org/info/tdb. The majority of this patch comes from moving internal functions to _<funcname> to avoid double-tracing. There should be no additional overhead for the normal (!TDB_TRACE) case. Note that the verbose traces compress really well with rzip. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-09-07tdb: fix c++ build warning.Günther Deschner1-2/+2
Guenther
2009-07-30realloc() has that horrible overloaded free semantic when size is 0:Rusty Russell1-2/+7
current code does a free of the old record in this case, then fail.
2009-05-21Detect tight loop in tdb_find()Jim McDonough1-0/+5
2008-12-16imported the tdb_repack() code from CTDBAndrew Tridgell1-0/+89
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
2008-09-17Move common libraries from root to lib/.Jelmer Vernooij1-0/+802