summaryrefslogtreecommitdiffstats
path: root/lib/tdb
Commit message (Collapse)AuthorAgeFilesLines
* One would expect I could spell my name...Michael Adam2009-08-301-1/+1
|
* tdb: move the original abi_checks script to script/abi_checks_gcc.shMichael Adam2009-08-301-0/+0
| | | | Michael
* tdb: run abi_checks as part of "make test".Michael Adam2009-08-301-0/+2
| | | | | | | Strange: I had to place "test:: abi_checks" before the main "test::" target here, otherwise the abi checks would not get run. Michael
* tdb: remove files generated by "make abi_checks" in "make clean".Michael Adam2009-08-301-0/+2
| | | | Michael
* tdb: add a target "abi_checks" to tdb.Michael Adam2009-08-301-0/+4
| | | | | | Simply run "make abi_checks" to call the abi check script appropriately. Michael
* tdb: add script/abi_checks.sh. check for abi changes without gcc magic.Michael Adam2009-08-301-0/+91
| | | | | | | | | USAGE: abi_checks.sh LIBRARY_NAME header1 [header2 ...] This creates symbol signature lists using the mksyms and mksigs scripts and compares them with the checked in lists. Michael
* tdb: add script to extract signatures from header files.Michael Adam2009-08-301-0/+178
| | | | | | | | | | | | This produces output like the output gcc produces when invoked with the -aux-info switch. Run like this: cat include/tdb.h | ./script/mksigs.pl This simple parser is probably too coarse to handle all possible header files, but it treats tdb.h correctly... Michael
* tdb: add scripts to extract library symbols (exports file) from headersMichael Adam2009-08-302-0/+121
| | | | Michael
* lib/tdb: don't overwrite TDBs with different version numbers.Rusty Russell2009-08-281-5/+7
| | | | | | In future, this may happen, and we don't want to clobber them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* Add define guards around otherwise unused variable.Jeremy Allison2009-08-061-0/+3
| | | | Jeremy.
* There is one signedness issue in tdb which prevents traverses of TDB recordsRusty Russell2009-08-061-9/+21
| | | | | | | | | | | over the 2G offset on systems which support 64 bit file offsets. This fixes that case. On systems with 32 bit offsets, expansion and fcntl locking on these records will fail anyway. SAMBA already does '#define _FILE_OFFSET_BITS 64' in config.h (on my 32-bit x86 Linux system at least) to get 64 bit file offsets. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: don't alter tdb->flags in tdb_reopen_all()Rusty Russell2009-07-311-6/+13
| | | | | | | The flags are user-visible, via tdb_get_flags/add_flags/remove_flags. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tdb: Reimplementation of Metze's "lib/tdb: if we know pwrite and pread are ↵Rusty Russell2009-07-311-5/+10
| | | | | | | | | | | | | | | | | | | thread/fork safe tdb_reopen_all() should be a noop". This version just wraps the reopen code, so we still re-grab the lock and do the normal sanity checks. The reason we do this at all is to avoid global fd limits, see: http://forums.fedoraforum.org/showthread.php?t=210393 Note also that this whole reopen concept is fundamentally racy: if the parent goes away before the child calls tdb_reopen_all, the database can be left without an active lock and another TDB_CLEAR_IF_FIRST opener will clear it. A fork_with_tdbs() wrapper could use a pipe to solve this, but it's hardly elegant (what if there are other independent things which have similar needs?). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tdb: Revert "lib/tdb: if we know pwrite and pread are thread/fork safe ↵Rusty Russell2009-07-311-5/+0
| | | | | | | | | | tdb_reopen_all() should be a noop" This reverts commit e17df483fbedb81aededdef5fbb6ae1d034bc2dd. tdb_reopen_all also restores the active lock, required for TDB_CLEAR_IF_FIRST. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* realloc() has that horrible overloaded free semantic when size is 0:Rusty Russell2009-07-301-2/+7
| | | | current code does a free of the old record in this case, then fail.
* If the record is at the end of the database, pretending it has length 1Rusty Russell2009-07-301-4/+1
| | | | might take us out-of-bounds. Only pretend to be length 1 for the malloc.
* tdb: fix locking errorRusty Russell2009-07-211-1/+1
| | | | | | | | | | | | | | | | | | 54a51839ea65aa788b18fce8de0ae4f9ba63e4e7 "Make tdb transaction lock recursive (samba version)" was broken: I "cleaned it up" and prevented it from ever unlocking. To see the problem: $ bin/tdbtorture -s 1248142523 tdb_brlock failed (fd=3) at offset 8 rw_type=1 lck_type=14 len=1 tdb_transaction_lock: failed to get transaction lock tdb_transaction_start failed: Resource deadlock avoided My testcase relied on the *count* being correct, which it was. Fixing that now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Michael Adam <obnox@samba.org>
* Make tdb transaction lock recursive (samba version)Rusty Russell2009-07-203-21/+20
| | | | | | | | | | | | | | | | | | | This patch replaces 6ed27edbcd3ba1893636a8072c8d7a621437daf7 and 1a416ff13ca7786f2e8d24c66addf00883e9cb12, which fixed the bug where traversals inside transactions would release the transaction lock early. This solution is more general, and solves the more minor symptom that nested traversals would also release the transaction lock early. (It was also suggestd in Volker's comment in 6ed27ed). This patch also applies to ctdb, if the traverse.c part is removed (ctdb's tdb code never received the previous two fixes). Tested using the testsuite from ccan (adapted to the samba code). Thanks to Michael Adam for feedback. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Michael Adam <obnox@samba.org>
* tdb: fix define of tdbdir when srcdir != "."Björn Jacke2009-07-031-2/+2
|
* Sort the signature filesSimo Sorce2009-07-032-44/+44
|
* tdb: Fix help string in configure flag to enable Python bindings.Jelmer Vernooij2009-06-171-1/+1
|
* fix release scripts to always git cleanSimo Sorce2009-06-171-0/+3
| | | | | This makes sure we do not include foreign object files or other build byproducts by mistake.
* Add exports file and abi checker for tdbtdb-1.1.5Simo Sorce2009-06-157-3/+172
| | | | | | | | This is a first attempt at exporting symbols only for public functions We also provide a rudimentary ABI checker that tries to check that function signatures are not changed by mistake. Given our use of macros this is not an API checker. It's all based on tdb.h contents and the gcc -aux-info option
* Add option to --disable-python on buildSimo Sorce2009-06-151-0/+9
|
* lib/tdb/tools/tdbtorture.c: fixed memory leak.Slava Semushin2009-06-061-0/+2
| | | | | Found by cppcheck: [lib/tdb/tools/tdbtorture.c:326]: (error) Memory leak: pids
* overallocate all records by 25%Andrew Tridgell2009-06-011-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.
* auto-repack in transactions that expand the tdbAndrew Tridgell2009-06-011-0/+12
| | | | | | The idea behind this is to recover from badly fragmented free lists. Choosing the point where the file expands is fairly arbitrary, but seems to work well.
* fixed tdbbackup to give tdb error messagesAndrew Tridgell2009-05-281-7/+31
|
* Merge branch 'master' of ssh://git.samba.org/data/git/sambaAndrew Tridgell2009-05-281-6/+6
|\
| * tdb: Fix some recently introduced warnings in tdbtoolTim Prouty2009-05-271-6/+6
| |
* | make TDB_NOSYNC affect all the fsync/msync calls in transactionsAndrew Tridgell2009-05-281-5/+7
|/ | | | | | During a transaction commit tdb normally uses fsync/msync calls to make it crash safe. This can be disabled using the TDB_NOSYNC flag, but it wasn't disabling all the code paths that caused a fsync/msync.
* added some more speed tests to tdbtoolAndrew Tridgell2009-05-261-6/+59
| | | | | | | This adds 3 simple speed tests to tdbtool, for transaction store, store and fetch. On my laptop this shows transactions costing about 10ms
* Detect tight loop in tdb_find()Jim McDonough2009-05-211-0/+5
|
* Update copies of config.guess and config.sub.Jelmer Vernooij2009-05-162-76/+282
|
* Update tdb and talloc web pagesSimo Sorce2009-05-051-4/+10
|
* Add release scripts for talloc and tdbSimo Sorce2009-05-051-0/+45
|
* tdb: Remove unused variableTim Prouty2009-03-311-1/+0
|
* up the version to 1.1.4 with the addition ofAndrew Tridgell2009-03-311-1/+1
| | | | tdb_transaction_prepare_commit()
* added basic testing of tdb_transaction_prepare_commit() in tdbtortureAndrew Tridgell2009-03-311-0/+6
|
* Add tdb_transaction_prepare_commit()Howard Chu2009-03-313-52/+133
| | | | | | | | 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
* lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() ↵Stefan Metzmacher2009-02-251-0/+5
| | | | | | | | | should be a noop The reason for tdb_reopen_all() is that the seek pointer on fds are shared between parent and child. metze
* lib/tdb: don't generate a static library for the samba4 buildStefan Metzmacher2009-02-031-1/+1
| | | | | | We also don't do this for talloc and ldb. metze
* lib/tdb: the python bindings don't use swig anymoreStefan Metzmacher2009-02-021-4/+2
| | | | metze
* s3 build: Remove unused fstat check to fix a bunch of HAVE_FSTAT warningsTim Prouty2009-01-301-4/+0
|
* lib/tdb: include replace.h and system/filesys.h in pytdb.cStefan Metzmacher2009-01-301-4/+3
| | | | | | This fixes the build on Tru64. metze
* Avoid using a utility header for Python replacements included in Samba,Jelmer Vernooij2009-01-081-1/+5
| | | | since this will not be shipped with talloc/tdb/tevent/etc.
* s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4Tim Prouty2009-01-071-1/+1
|
* py: Properly increase the reference counter of Py_None.Jelmer Vernooij2009-01-061-16/+16
|
* Fix all warnings in source3 with gcc4.3.Jeremy Allison2008-12-311-1/+3
| | | | Jeremy.
* standalone: Use more variables, preparing to include these files from mainJelmer Vernooij2008-12-231-5/+6
| | | | Samba 4 makefile.