summaryrefslogtreecommitdiff
path: root/lib/tdb/common/freelist.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-28tdb: fix logging of offets and lengths.Rusty Russell1-4/+4
We can have offsets > 2G, so use unsigned values. Fixes other prints to be native types rather than casts, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue May 28 11:22:14 CEST 2013 on sn-devel-104
2013-02-05tdb: Remove "header" from tdb_contextVolker Lendecke1-2/+2
header.hash_size was the only thing we ever referenced outside of tdb_open_ex and its direct callees. So this shrinks the tdb_context by 164 bytes. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Feb 5 13:18:28 CET 2013 on sn-devel-104
2012-12-21tdb: Fix blank line endingsVolker Lendecke1-12/+12
Reviewed-by: Rusty Russell <rusty@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-21tdb: Fix a missing CONVERTVolker Lendecke1-1/+1
methods->tdb_write expects data in on-disk format. For reading that record, methods->tdb_read() has taken care of the on-disk to in-memory representation according to the DOCONV() flag passed down. tdb_rec_write() is a wrapper around methods->tdb_write just doing the CONVERT() on the way to disk. Reviewed-by: Rusty Russell <rusty@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2011-12-19tdb: be more careful on 4G files.Rusty Russell1-1/+1
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
2010-10-21tdb: Set _PUBLIC_ in C file rather than header files (Debian bug 600898)Jelmer Vernooij1-1/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Thu Oct 21 11:47:22 UTC 2010 on sn-devel-104
2010-03-25Fix some nonempty blank linesVolker Lendecke1-4/+4
2010-02-22Spelling fixes for tdb.Brad Hards1-1/+1
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2009-10-23tdb: rename 'struct list_struct' into 'struct tdb_record'Stefan Metzmacher1-9/+9
metze
2009-10-22lib/tdb: wean off TDB_ERRCODE.Rusty Russell1-2/+3
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-06-01overallocate all records by 25%Andrew Tridgell1-0/+3
This greatly reduces the fragmentation of databases where records tend to grow slowly by a small amount each time. The case where this is most seen is the ldb index records. Adding this overallocation reduced the size of the resulting database by more than 20x when running a test that adds 10k users.
2008-09-17Move common libraries from root to lib/.Jelmer Vernooij1-0/+382