summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/include
AgeCommit message (Collapse)AuthorFilesLines
2008-01-18merged changes from v3-2-testAndrew Tridgell1-4/+3
(This used to be commit 7077df3e2e3f171532f6a5ac87d45201736c9c11)
2008-01-15merged tdb from ctdb bzr treeAndrew Tridgell1-0/+5
(This used to be commit ed0c3a0f74c305b3b8554b05c3f97cf79db8296a)
2007-12-21r25892: Keep the tdb code in sync between 3.2.x and 4.0.Jeremy Allison1-0/+2
Add in the alarm fix to allow locks to exit on alarm signal. Sync up the changes in tools. Jeremy. (This used to be commit cb6c663fa8818f49cc36f196bb5f4dea47edd69e)
2007-10-10r23978: Merge r23161 from Samba3:Michael Adam1-0/+1
Add TDB_VOLATILE as open_flag to activate the per-hashchain dead record optimization. (This used to be commit 868cdb1781fe94afbc1658e72bf06de20193bcd7)
2007-10-10r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell1-2/+1
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10r23795: more v2->v3 conversionAndrew Tridgell1-1/+1
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10r22832: merged the latest tdb changes from ctdb to Samba4Andrew Tridgell1-0/+8
(This used to be commit a88ab4fa3a07c31bc45c612043f9e096f384eda4)
2007-10-10r22422: merged tdb changes from ctdbAndrew Tridgell1-0/+1
(This used to be commit a0ff739bcab32065d9d3957eb1d93f7791f84f04)
2007-10-10r22041: merge trivial changes from samba3Stefan Metzmacher1-1/+1
metze (This used to be commit 902a76ca705f07c61f86a9ef1346583ba9d3157d)
2007-10-10r21722: Add the dead record functionality presented on ↵Volker Lendecke1-0/+1
samba-technical@samba.org. If you do a tdb_set_max_dead(tdb, n), then for this tdb a delete operation will only mark a record as dead and re-use it if a new record is created. The parameter n allows for at most n dead records per hash chain. If this number is exceeded, all dead records are put on the central freelist. Volker (This used to be commit 98a27ab28a3cd554e370a9a0e3652f4dea8749e9)
2007-10-10r21445: Apply tdb_parse_record Tridges error return, merge to 3_0_25 and 4_0Volker Lendecke1-0/+4
(This used to be commit afe7d7855841066b88859976ac748cbf438a9a9f)
2007-10-10r19960: Add code to check for loops in the free list.Jeremy Allison1-0/+1
Should help us validate tdb's against corruption. Jeremy. (This used to be commit bd0710fa09799cb496b1f9f365c57c3b542445f3)
2007-10-10r19428: moved tdbutil.c from lib/tdb/common/ to lib/util/util_tdb.cAndrew Tridgell1-51/+0
tdbutil.c is Samba specific, so should not be part of the generic tdb library (This used to be commit 979dd24f5e44605fc1603b690913b8c31be7478f)
2007-10-10r19425: two more tdb functions from samba3Andrew Tridgell1-0/+2
(This used to be commit c9d9d79c34e8a36a6f684b173b1cc861330adc5c)
2007-10-10r19423: merge some tdb changes from SAMBA_3_0 to SAMBA_4_0Andrew Tridgell1-0/+1
this is in preparation of a merge in the other direction (This used to be commit db3211079fd594aa03c3b9bb3eb6ad86bdd32837)
2007-10-10r19401: make tdb_lockall() much more efficient, and add a tdb_lockall_read()Andrew Tridgell1-1/+3
call which does a read lock on all chains. These will be used to make ldb searches more efficient (This used to be commit de664ec1f8cf179f1d650563272c0de3f7636e2b)
2007-10-10r19276: remove unused fileStefan Metzmacher1-58/+0
metze (This used to be commit bd4cd24a9dc370552a90f267bdcabf4cb45c8507)
2007-10-10r16916: Implement metze's proposed changes to the tdb logging API.Andrew Bartlett1-3/+7
This clearly links the log function with its private pointer, and makes the argument list for tdb_open_ex a bit shorter. Andrew Bartlett (This used to be commit 5d5503e8d8a10ead3ef21a5ffda52cadb9a07727)
2007-10-10r16774: This patch modifies the tdb API to allow the logging function to be usedAndrew Bartlett1-3/+9
as part of ldb. This allows tdb failures to be passed all the way up to Samba's DEBUG system, which allowed easier debugging. Unfortunately I had to extend the tdb API, as the logging function didn't have a context pointer. I've worked over the 'debug levels' in TDB. Most of them were 0, which didn't seem right, as some were trace-like messages. We didn't see any of these previously, except when accessing TDB directly. Andrew Bartlett (This used to be commit 58898092c1ce043f6d698db5065f372b79109e22)
2007-10-10r15100: Port the bugfix for #3569 to Samba4Volker Lendecke1-1/+1
(This used to be commit 5f1d52f232051324082b840f29dd7719a9328bd5)
2007-10-10r14799: added a tdb_get_seqnum() call, and the TDB_SEQNUM flag. This allowsAndrew Tridgell1-0/+2
for an extremely lightweight test to see if a tdb has possibly changed. (This used to be commit f325ba605ccceca63712c0f2c98961e35e437b3d)
2007-10-10r14616: added notify change support to the posix backendAndrew Tridgell1-0/+1
It doesn't fully work yet, and doesn't yet have all the efficiency that is planned, but it doesn't break anything and I wanted to get the code in the tree to minimise the chance of collisions with the work metze is doing. (This used to be commit 1624ea88e6eef89caacc36e7513aa79df0d579b9)
2007-10-10r11567: Ldb API change patch.Simo Sorce1-9/+48
This patch changes the way lsb_search is called and the meaning of the returned integer. The last argument of ldb_search is changed from struct ldb_message to struct ldb_result which contains a pointer to a struct ldb_message list and a count of the number of messages. The return is not the count of messages anymore but instead it is an ldb error value. I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good amount of places. I also tried to double check all my changes being sure that the calling functions would still behave as before. But this patch is big enough that I fear some bug may have been introduced anyway even if it passes the test suite. So if you are currently working on any file being touched please give it a deep look and blame me for any error. Simo. (This used to be commit 22c8c97e6fb466b41859e090e959d7f1134be780)
2007-10-10r10421: following on discussions with simo, I have worked out a way ofAndrew Tridgell1-1/+2
allowing searches to proceed while another process is in a transaction, then only upgrading the transaction lock to a write lock on commit. The solution is: - split tdb_traverse() into two calls, called tdb_traverse() and tdb_traverse_read(). The _read() version only gets read locks, and will fail any write operations made in the callback from the traverse. - the normal tdb_traverse() call allows for read or write operations in the callback, but gets the transaction lock, preventing transastions from starting inside the traverse In addition we enforce the following rule that you may not start a transaction within a traverse callback, although you can start a traverse within a transaction With these rules in place I believe all the deadlock possibilities are removed, and we can now allow for searches to happen in parallel with transactions (This used to be commit 7dd31288a701d772e45b1960ac4ce4cc1be782ed)
2007-10-10r10405: added transactions into tdb, and hook them into ldb. See myAndrew Tridgell1-2/+15
samba-technical posting for more details on the transactions design. This also adds a number of command line arguments to tdbtorture, making it more flexible, and fixes some lock deadlock conditions in the tdbtorture code. (This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
2007-10-10r10253: a fairly large tdb cleanup and re-organise. Nearly all of this changeAndrew Tridgell4-149/+65
just involves splitting up the core tdb.c code into separate files on logical boundaries, but there are some minor functional changes as well: - move the 'struct tdb_context' into tdb_private.h, hiding it from users. This was done to allow the structure to change without breaking code that uses tdb. - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to access the elements of struct tdb_context that were used by external code but are no longer visible - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just as good due to the way tdb locks work - changed some of the types (such as tdb_off to tdb_off_t) to make syntax highlighting work better - removed the old optional spinlock code. It was a bad idea. - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes fail or report nasty looking errors. This is the only real bug fixed in this commit. Jeremy/Jerry, you might like to pickup this change for Samba3, as that could definately affect smbd in Samba3. The aim of all of these changes is to make the tdb transactions/journaling code I am working on easier to write. I started to write it on top of the existing tdb.c code and it got very messy. Splitting up the code makes it much easier to follow. There are more cleanups we could do in tdb, such as using uint32_t instead of u32 (suggested by metze). I'll leave those for another day. (This used to be commit 4673cdd0d261614e707b72a7a348bb0e7dbb2482)
2007-10-10r9455: Support for reading the policy databaseJelmer Vernooij1-0/+2
(This used to be commit 7548a5012aad41bde0652d4532d184545997be86)
2007-10-10r9448: Work on reading the secrets tdb. Build tdbsam support by default.Jelmer Vernooij1-0/+2
(This used to be commit 9ea601c0a675767f8ea5f316c9355572dffbc4c0)
2007-10-10r5780: Remove unused arguments.Tim Potter1-1/+1
(This used to be commit 1ee84e373e2b44c96f9353f194b766d6a144e7ce)
2007-10-10r5779: Remove signal and timeout gubbage from tdb.Tim Potter1-1/+0
(This used to be commit dbb56e9a59cf00d57b09ded6d60bf9424d5f1f4c)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell2-0/+4
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r5143: don't generate prototypes for lib/tdb/Stefan Metzmacher2-1/+11
metze (This used to be commit 1c48c30aaf58d069cdba2f59b5c012bc4bdd3efc)
2007-10-10r2985: got rid of the unused tdb_lockkeys() and tdb_unlockkeys() functionsAndrew Tridgell1-3/+0
they have been broken for 4 years (ever since they were added) and have been never used, which makes them prime candidates for destruction. (This used to be commit 0b53ab85aae4569c04495f07c18a65fd6b47bf4c)
2007-10-10r2493: allow tdb to build standaloneAndrew Tridgell1-0/+4
(This used to be commit 0d5af5b70bd010e7107b18f73a4b899e05c4f025)
2007-10-10r2238: the tdb_debug() function was totally bogus - remove it (you can'tAndrew Tridgell1-3/+1
convert a ... varargs function to a va_list by just a cast!!) also mark the tdb log function with PRINTF_ATTRIBUTE() and fixed some bad format errors in tdb.c that jim found. (This used to be commit c26c92eb8f538748fcbb2ae5a0a8a02bffbbbf86)
2007-10-10r2034: Allow user-selectable hash functions on open only.Jeremy Allison1-1/+4
Jeremy. (This used to be commit b43320ee5c9ac14c330e61ae62e0786b088e04fa)
2007-10-10r1053: Make tdb build standalone:Tim Potter1-2/+2
- #include <stdint.h> - uint_t isn't a valid type, change back to unsigned int (This used to be commit f690325565d2393bba3cb9f6e7cdf3753cbd4423)
2007-10-10r960: convert 'unsigned int' to uint_t in the most placesStefan Metzmacher1-2/+2
metze (This used to be commit 18062d2ed9fc9224c43143c10efbf2f6f1f5bbe0)
2007-10-10r848: convert lib/tdb into the same layout as lib/ldbStefan Metzmacher3-0/+249
metze (This used to be commit bacab322ce89979f0ad0811cd15b73d81eceb69d)