summaryrefslogtreecommitdiffstats
path: root/ctdb/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/tevent: In poll_event_context, add a pointer back to the tevent_contextMartin Schwenke2012-06-121-0/+4
| | | | | | | | | This makes it consistent with the other backends. Signed-off-by: Martin Schwenke <martin@meltin.net> Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit e0c9200c05b1f7a04e002f505ebb5ba9340c0ca1)
* lib/tevent/testsuite: no longer use 'compat' symbolsStefan Metzmacher2012-06-121-12/+12
| | | | | | metze (This used to be ctdb commit 6559106b8b853920f325f2dba532f4008e931fa3)
* server: Replace BOOL datatype with bool, True/False with true/falseAmitay Isaacs2012-05-281-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d)
* TEVENT: Add back tracking of long runnig events to the local copy of tevent ↵Ronnie Sahlberg2012-05-215-0/+66
| | | | | | library (This used to be ctdb commit 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00)
* Merge remote branch 'amitay/tdb-sync'Ronnie Sahlberg2012-04-2644-4858/+1547
|\ | | | | | | (This used to be ctdb commit 8052ee0a6bda3fa88501d77b2d53315be2b75ec1)
| * lib/tdb: Sync tdb from samba git treeAmitay Isaacs2012-04-1324-423/+1547
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)
| * lib/tdb: Remove the files required to build tdb as a libraryAmitay Isaacs2012-04-1320-4435/+0
| | | | | | | | | | | | | | | | | | Since tdb library will never be built from ctdb sources, we don't need the build related files. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a7aace3d165e6cb7d63950107e584edaee12a357)
* | Merge remote branch 'amitay/tevent-sync'Ronnie Sahlberg2012-04-2641-4676/+877
|\ \ | | | | | | | | | (This used to be ctdb commit 17ff3f240b0d72c72ed28d70fb9aeb3b20c80670)
| * | lib/tevent: Sync tevent from samba git treeAmitay Isaacs2012-04-1318-76/+885
| | | | | | | | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 483459c79884891b3639a8bb865d5e8318cde98c)
| * | lib/tevent: Remove the files required to build tevent as a libraryAmitay Isaacs2012-04-1323-4527/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we are not going to build tevent library from ctdb source, remote build related files. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit efbb7e0b9dcde547b46efd8e3b26c571e4fcf893)
| * | lib/tevent: Remove local modifications to teventAmitay Isaacs2012-04-135-69/+0
| | | | | | | | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit d1bc4a97ea649f5a07802178591688e438313ff8)
| * | Remove explicit include of lib/tevent/tevent.h.Amitay Isaacs2012-04-131-1/+0
| | | | | | | | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
| * | includes: Move special tevent defines from tevent.h to includes.hAmitay Isaacs2012-04-131-11/+0
| |/ | | | | | | | | | | | | | | | | This allows to build against system tevent library. Also include tevent header along with other common headers. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 9ae4389c2c959c5dcd8395fdae2b25ed7e1e873a)
* | lib/talloc: Sync talloc from samba git treeAmitay Isaacs2012-04-138-182/+813
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 670ebada4bafe79bd535c9bb5cc2d5d49d646af3)
* | lib/talloc: Remove the files required to build talloc as a libraryAmitay Isaacs2012-04-1311-5022/+0
|/ | | | | | | Since talloc library will never be built from ctdb sources, we don't need the build related files. (This used to be ctdb commit 2cd6a7ce648c1d2cc4d5580c3809858c100fa930)
* build: Use system tdb library if availableAmitay Isaacs2012-03-301-21/+45
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 10ab88a5c822ac403a70a9cd1a6c81020eb91d08)
* build: Use system tevent library if availableAmitay Isaacs2012-03-301-24/+42
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2ade83de4e1f318c91489ec9a7f90d1b26f77e1b)
* build: Use system talloc library if availableAmitay Isaacs2012-03-301-19/+44
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 94f1e02406c353c3a0235685acdd107ee5a7f285)
* change TDB to be valgrind niceRonnie Sahlberg2012-02-221-0/+2
| | | | (This used to be ctdb commit d306c3c9a53e012c412c96ab9743de6cd96826e0)
* add socket_wrapper from sambaMichael Adam2011-11-266-0/+2981
| | | | (This used to be ctdb commit 99ce8a9de648babdfb1b1ea0219ee184c9718048)
* libutil: Remove obsolete signal type cast.Andreas Schneider2011-11-261-5/+5
| | | | (This used to be ctdb commit 8dd377b6a4d188af086f9a5b41a1b48e44eda6f3)
* update lib/replace to current upstream version (samba master)Michael Adam2011-11-2656-540/+4301
| | | | (This used to be ctdb commit 17bcffab19fdbb435b4745ff90c327342bbbf0f8)
* Added some #ifndefs to stop files being included multiple times.Martin Schwenke2011-11-111-0/+4
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fdca12c25e6fce6206135b994dedf44265e4eb09)
* Fix lib/replaceMartin Schwenke2011-11-115-3/+176
| | | | | | | | | | | | | | | | | Warnings are generated when compiling strptime.c. Why is it being compiled on Linux? strptime(3) has been in glibc for 15 years! It turns out that some of the test fragments were being looked for in lib/replace/test/ and some in lib/replace/tests/. In addition, test*/strptime.c was missing. Move the tests to lib/replace/test/ for consistency with upstream (Samba) and copy in test/strptime.c from Samba. Tweak repdir.m4 to handle the directory rename. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit aaf1ddfc83cf2ede29288baf04a1aa1c69a5cab5)
* Clean up warnings: popt sure does some strange thingsMartin Schwenke2011-11-113-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | popt generates 4 compiler warnings with GCC 4.6. There are 2 different types: * 3 instances of: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] One occurs in the _free() hack that is used to try and avoid a compiler warning. I guess GCC got smarter? ;-) The other is where an array of constant strings is passed to execvp(2), which arguably has the wrong type, since it has no need to modify the strings. Both of these can be worked around by casting to intptr_t before casting to the desired argument type. In poptReadConfigFile() the variable file is declared to be a constant string. However, it is then passed to read(2) straight away and an attempt is made to cast away the "const". However, to protect the value the of file is assigned to (const char *) chptr before it is passed to any other functions, so this protects the value anyway. I'm not sure exactly what the thinking was here... but there seems to be no use having file be constant. * 1 instance of: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] for the result of an execvp(2) call. Recast the return type to void. However, due to some #if-fu in the function, that can make rc unused in this function. So we also need to wrap the declaration of rc in some corresponding #if-fu to make it disappear if not used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ac9236e64bd0b61740cc787819a1222bc6a67d4a)
* Clean up warnings: -Wunused-but-set-variable in tevent_signal.cMartin Schwenke2011-11-101-4/+2
| | | | | | | | Have sent this upstream to Samba. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 080edee3d053d770466ebcc976eb1135c80feef8)
* Clean up warnings: ‘tevent_loop_allow_nesting’ is deprecatedMartin Schwenke2011-11-091-0/+7
| | | | | | | | | | CTDB wants to use these functions but Samba's tevent wants to mark them deprecated. This adds a #define to shut up the warnings and sets it in CFLAGS. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 788cdbddbc902a5b076d23473450065b551d274d)
* Fix broken readdirMathieu Parent2011-10-121-3/+3
| | | | | | | | Submited by Lorenzo De Liso on <http://bugs.debian.org/603155> (originaly named 99-fix-broken-readdir-test.diff). Also reported as <https://bugzilla.samba.org/show_bug.cgi?id=7032>. (This used to be ctdb commit 29474420606e802c83b53ef5f8e372c8eeac83c1)
* Drop loglevel for a tevent message from FATAL to ERRORRonnie Sahlberg2011-09-081-1/+1
| | | | | | CQ S1028400 (This used to be ctdb commit 3ce1d3d6c8b8fd3097b8efd2c75797ed7682a562)
* tdb: expose transaction lock infrastructure for ctdbRusty Russell2011-01-182-0/+24
| | | | | | | | | tdb_traverse_read() grabs the transaction lock. This can cause ctdbd (which uses it) to block when it should not; expose mark and normal variants of this lock, so ctdbd's child (the recovery daemon) can acquire it and the ctdbd parent can mark it was held. (This used to be ctdb commit d09fa845bd848d04507853809acf42e0471b44bf)
* change Christinas previous patch to only perform the check/loggingRonnie Sahlberg2011-01-174-8/+12
| | | | | | | | if we are the main ctdb daemon. Other daemons/child processes are not guaranteed to get events on regular basis so those should not be checked. (This used to be ctdb commit ac2afe9c25753b837d5f6396020e0f3c65ef3628)
* improve timing issue detectionsChristian Ambach2011-01-176-15/+61
| | | | | | | | | | | the original "Time jumped" messages are too coarse to interpret exactly what was going wrong inside of CTDB. This patch removes the original logs and adds two other logs that differentiate between the time it took to work on an event and the time it took to get the next event. (This used to be ctdb commit fd8d54292f10b35bc4960d64cfa6843ce9aba225)
* idtree: fix overflow for v. large ids on allocation and removalRusty Russell2010-12-071-1/+1
| | | | | | | | | | | | | | (Imported from SAMBA commit 09a6538969ac). Chris Cowan tracked down a SEGV in sub_alloc: idp->level can actually be equal to 7 (MAX_LEVEL) there, as it can be in sub_remove. (We unfairly blamed a shift of a signed var for this crash in commit 2db1987f5a3a). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 73764104356d3738d9d20a9d06ce51535f74f475)
* idtree: fix right shift of signed ints, crash on large ids on AIXRusty Russell2010-10-071-1/+1
| | | | | | | | | | | | | | | | | | | Right-shifting signed integers in undefined; indeed it seems that on AIX with their compiler, doing a 30-bit shift on (INT_MAX-200) gives 0, not 1 as we might expect. The obvious fix is to make id and oid unsigned: l (level count) is also logically unsigned. (Note: Samba doesn't generally get to ids > 1 billion, but ctdb does) Reported-by: Chris Cowan <cc@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@samba.org> Autobuild-Date: Wed Oct 6 08:31:09 UTC 2010 on sn-devel-104 (This used to be ctdb commit 53d49df2d4519c35b270c30660e2504af2a5ed5c)
* pytdb: Add __version__ attribute.Jelmer Vernooij2010-10-072-0/+8
| | | | (This used to be ctdb commit 2b81314eb94d31f4efadd2a3dcf2f6e176338d3f)
* pytdb: Include Python.h first to prevent warning.Jelmer Vernooij2010-10-071-1/+1
| | | | (This used to be ctdb commit 247dacde0d0de1358cc2c27d08914be605272023)
* pytdb: Check errors after PyObject_New() callsKirill Smelkov2010-10-071-0/+7
| | | | | | | | | | The call could fail with e.g. MemoryError, and we'll dereference NULL pointer without checking. Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit 09369aa86e233a58ed131fa5b7584b6c86527d40)
* pytdb: Add support for tdb_repack()Kirill Smelkov2010-10-072-0/+15
| | | | | | | | Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit ce84abcc6be31554da73920280e6bfc5b63b1464)
* pytdb: Add TDB_INCOMPATIBLE_HASH open flagKirill Smelkov2010-10-071-0/+1
| | | | | | | | | | | | | In 2dcf76 Rusty added TDB_INCOMPATIBLE_HASH open flag which selects Jenkins lookup3 hash for new databases. Expose this flag to python users too. Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit 07880810941850e81442b888cd70d810d3f80fc3)
* tdb: fix non-WAF build, commit 1.2.6 ABI file.Rusty Russell2010-10-072-1/+62
| | | | | | | | Sorry Jeremy. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 7db9838cb5af0d334efbbcb96bfa51d19b35941a)
* tdb: TDB_INCOMPATIBLE_HASH, to allow safe changing of default hash.Rusty Russell2010-10-075-5/+22
| | | | | | | | | | | | | | | | | | This flag to tdb_open/tdb_open_ex effects creation of a new database: 1) Uses the Jenkins lookup3 hash instead of the old gdbm hash if none is specified, 2) Places a non-zero field in header->rwlocks, so older versions of TDB will refuse to open it. This means that the caller (ie Samba) can set this flag to safely change the hash function. Versions of TDB from this one on will either use the correct hash or refuse to open (if a different hash is specified). Older TDB versions will see the nonzero rwlocks field and refuse to open it under any conditions. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit dd86b24ae5307fe09d4ae22b7070d747013a2b07)
* tdb: automatically identify Jenkins hash tdbsRusty Russell2010-10-071-14/+27
| | | | | | | | | | | | If the caller to tdb_open_ex() doesn't specify a hash, and tdb_old_hash doesn't match, try tdb_jenkins_hash. This was Metze's idea: it makes life simpler, especially with the upcoming TDB_INCOMPATIBLE_HASH flag. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 3f7ed2b46cb304d553d3f7bd34554d695b8ccc52)
* tdb: add Bob Jenkins lookup3 hash as helper hash.Rusty Russell2010-10-075-16/+384
| | | | | | | | | | | | This is a better hash than the default: shipping it with tdb makes it easy for callers to use it as the hash by passing it to tdb_open_ex(). This version taken from CCAN and modified, which took it from http://www.burtleburtle.net/bob/c/lookup3.c. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 58c9d90c758aa7c062d84ab97f62947190526356)
* tdb: add restoreVolker Lendecke2010-10-073-1/+239
| | | | | | Based on an idea by Simon McVittie, largely rewritten (This used to be ctdb commit 7cda5507f90d7598d745a1acfc66c2afa73cd4b5)
* lib/tdb: fix c++ build warning in tdb_header_hash().Günther Deschner2010-10-071-1/+1
| | | | | | Guenther (This used to be ctdb commit e34e639c214b010ff18140b769a8c9245c92006f)
* pytdb: Make filename argument optional.Jelmer Vernooij2010-10-072-13/+15
| | | | (This used to be ctdb commit 3cc73c51caff51e0cba688aefd6f37e632c0e8d4)
* pytdb: Add support for tdb_freelist_size()Kirill Smelkov2010-10-072-0/+9
| | | | | | | | Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit dcdd83e6d6786f0857acdf9aa04bca74a7ccf14d)
* pytdb: Add support for tdb_transaction_prepare_commit()Kirill Smelkov2010-10-072-0/+18
| | | | | | | | Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit fd16bcc1434841d84fdf78f80163c97c0b52b3fe)
* pytdb: Add support for tdb_enable_seqnum, tdb_get_seqnum and ↵Kirill Smelkov2010-10-072-0/+30
| | | | | | | | | | tdb_increment_seqnum_nonblock Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit 1778fd02eec6e64737167c46173c0c76c85cc4d9)
* pytdb: Update open flags to match those for tdb_open() in tdb.hKirill Smelkov2010-10-071-0/+6
| | | | | | | | | | | Namely TDB_NOSYNC, TDB_SEQNUM, TDB_VOLATILE, TDB_ALLOW_NESTING and TDB_DISALLOW_NESTING were missing. Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> (This used to be ctdb commit d0c28ff1fedd27a99a7550fcc74e18cb1f536986)