summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/tdb/common/traverse.c
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-build: Remove duplicate tdb libraryAmitay Isaacs2014-06-201-366/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/tdb: Sync tdb from samba git treeAmitay Isaacs2012-04-131-4/+4
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)
* tdb: Add a non-blocking version of tdb_transaction_startVolker Lendecke2010-04-221-2/+2
| | | | | | (Imported from commit 261c3b4f1beed820647061bacbee3acccbcbb089) (This used to be ctdb commit 87ced00d6d98be4a34719af58694e7c940b4dd68)
* Fix some nonempty blank linesVolker Lendecke2010-04-221-5/+5
| | | | | | (Imported from commit ea8e0d5d54b020c530e392c4edaeed43e20af303) (This used to be ctdb commit 7161cb1607bb105cd6f4f32df50f519314e77b3f)
* tdb: cleanup: split brlock and brunlock methods.Rusty Russell2010-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | This is taken from the CCAN code base: rather than using tdb_brlock for locking and unlocking, we split it into brlock and brunlock functions. For extra debugging information, brunlock says what kind of lock it is unlocking (even though fnctl locks don't need this). This requires an extra argument to tdb_transaction_unlock() so we know whether the lock was upgraded to a write lock or not. We also use a "flags" argument tdb_brlock: 1) TDB_LOCK_NOWAIT replaces lck_type = F_SETLK (vs F_SETLKW). 2) TDB_LOCK_MARK_ONLY replaces setting TDB_MARK_LOCK bit in ltype. 3) TDB_LOCK_PROBE replaces the "probe" argument. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from commit 452b4a5a6efeecfb5c83475f1375ddc25bcddfbe) (This used to be ctdb commit 7b5fdc9c588237c83a1e70e5437e2e5510055b92)
* tdb: rename 'struct list_struct' into 'struct tdb_record'Stefan Metzmacher2009-12-161-4/+4
| | | | | | | | | metze (cherry picked from samba commit 3b62e250c066f44d0ab08a7db037b6b4f74a914b) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 03b3682e3fa53c9f5fdf2c4beac8b5d030fd2630)
* lib/tdb: wean off TDB_ERRCODE.Rusty Russell2009-12-161-1/+2
| | | | | | | | | | | | | | | 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)
* lib/tdb: TDB_TRACE support (for developers)Rusty Russell2009-12-161-4/+19
| | | | | | | | | | | | | | | | | | 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> (cherry picked from samba commit 703004340c3e0f43f741bd368d2525cfd187d590) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit b01b756cb577f32a1ec4597efb00017241e01685)
* There is one signedness issue in tdb which prevents traverses of TDB records ↵Rusty Russell2009-12-161-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> (cherry picked from samba commit 252f7da702fd0409f7bfff05ef594911ededa32f) Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 2d768f664e6db65b3b7e0c732f33ee2b806892f9)
* merge from samba4Andrew Tridgell2008-01-181-0/+3
| | | | (This used to be ctdb commit 21245b894b32f232251fd7c0e2fbfd073fb10514)
* merge from Samba4Andrew Tridgell2008-01-051-6/+9
| | | | (This used to be ctdb commit 9aed7a1d065272c2e5b54872228a73f37664b526)
* convert tdb from u32 to uint32_t to match the current Samba treesAndrew Tridgell2008-01-051-1/+1
| | | | (This used to be ctdb commit 0dc754b7e8b0985a252885ed043949dfb7ea1ae1)
* avoid write locks during delete checks in traversalsAndrew Tridgell2008-01-051-0/+2
| | | | (This used to be ctdb commit dde9f3f0061988a0cdf10ee9e4db982c1b79ad1a)
* 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)
* global lock should imply the transaction lockAndrew Tridgell2007-05-221-9/+5
| | | | (This used to be ctdb commit 765a7e27344476ea8835565839b69872ea6ab6f0)
* added rest of tdb (missed in earlier commit)Andrew Tridgell2007-02-201-0/+335
(This used to be ctdb commit 4c1434cc4613fc94958de0aa882bf7ca41ec8458)