[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Fri Oct 30 04:05:03 UTC 2015
The branch, master has been updated
via 30a6a22 ctdb-include: Order function prototypes as per ctdb_client.c
via d2bd076 ctdb-include: Remove unused structures and prototypes
via 03beaa3 ctdb-include: Move client function prototypes to ctdb_client.h
via 404c91e ctdb-include: Move protocol structures from ctdb_private.h to ctdb_protocol.h
via 1e782e6 ctdb-include: Move protocol structures from ctdb_client.h to ctdb_protocol.h
via 6ce1aa9 ctdb-include: Group function prototypes from server/eventscript.c
via 819f862 ctdb-include: Group function prototypes from server/ctdb_vacuum.c
via 860f2edc6 ctdb-include: Group function prototypes from server/ctdb_uptime.c
via bdce6c4 ctdb-include: Group function prototypes from server/ctdb_update_record.c
via a24e2ae ctdb-include: Group function prototypes from server/ctdb_tunables.c
via 7ffd56d ctdb-include: Group function prototypes from server/ctdb_traverse.c
via 28b33b5 ctdb-include: Group function prototypes from server/ctdb_takeover.c
via 2d0f917 ctdb-include: Group function prototypes from server/ctdb_statistics.c
via b0f10a4 ctdb-include: Group function prototypes from server/ctdb_serverids.c
via beadc50 ctdb-include: Group function prototypes from server/ctdb_server.c
via c0a20b9 ctdb-include: Group function prototypes from server/ctdb_recoverd.c
via af95b2f ctdb-include: Group function prototypes from server/ctdb_recover.c
via 19f87a0 ctdb-include: Group function prototypes from server/ctdb_persistent.c
via 9bb5e7d ctdb-include: Group function prototypes from server/ctdb_monitor.c
via 3723eed ctdb-include: Group function prototypes from server/ctdb_ltdb_server.c
via ae35699 ctdb-include: Group function prototypes from server/ctdb_logging_syslog.c
via 930a620 ctdb-include: Group function prototypes from server/ctdb_logging_file.c
via bc14982 ctdb-include: Group function prototypes from server/ctdb_logging.c
via 8a4b342 ctdb-include: Group function prototypes from server/ctdb_lock.c
via 568a4ce ctdb-include: Group function prototypes from server/ctdb_keepalive.c
via d85e13b ctdb-include: Group function prototypes from server/ctdb_freeze.c
via 9c52c3d ctdb-include: Group function prototypes from server/ctdb_daemon.c
via 740bb90 ctdb-include: Group function prototypes from server/ctdb_control.c
via 171299d ctdb-include: Group function prototypes from server/ctdb_call.c
via 3132720 ctdb-include: Group function prototypes from server/ctdb_banning.c
via 8558b76 ctdb-include: Group function prototypes from tcp and ib
via 4647787 ctdb-daemon: Separate prototypes for common client/server functions
via f1b9d8f ctdb-common: Add missing prototype for ctdb_cmdline_client()
via ded94c4 ctdb-build: Calculate correct version when building from tarball
via f50ac68 ctdb-daemon: Remove unused header file include/internal/includes.h
via 01c6c90 ctdb-daemon: Remove dependency on includes.h
via 2fdb332 ctdb-daemon: Stop using tevent compatibility definitions
via 7084cb9 ctdb-include: Move include/internal/cmdline.h to common/
via b900adc ctdb-daemon: Separate prototypes for system specific functions
from 4346fe6 KCC: allow --test-all-reps-from to work with --import-ldif
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 30a6a2247b3d9e177398779544ef0d3e17e2bef7
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 27 17:34:06 2015 +1100
ctdb-include: Order function prototypes as per ctdb_client.c
This makes sure that all function prototypes in ctdb_client.h are in
the same order of functions defined in ctdb_client.c.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Fri Oct 30 05:04:49 CET 2015 on sn-devel-104
commit d2bd076a0fee9f94d936a0002ad44bd22fa5949f
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 27 16:45:12 2015 +1100
ctdb-include: Remove unused structures and prototypes
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 03beaa3d3daa51826361f06ec1a05c8791a096e2
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 27 15:34:30 2015 +1100
ctdb-include: Move client function prototypes to ctdb_client.h
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 404c91eeefb49b73f5a6f357dd18ab692306977c
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 27 16:29:36 2015 +1100
ctdb-include: Move protocol structures from ctdb_private.h to ctdb_protocol.h
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 1e782e6995639729a31afdd2ec03717ba866dff1
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 27 15:32:12 2015 +1100
ctdb-include: Move protocol structures from ctdb_client.h to ctdb_protocol.h
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 6ce1aa916e6c5b9abf3421cb3afe1e44a4fef0fb
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 16:00:39 2015 +1100
ctdb-include: Group function prototypes from server/eventscript.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 819f8626f7f83f9f5685dcbec3a74ea5dc2e8747
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:49:32 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_vacuum.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 860f2edc61ceb808b06a73f1f1f293fa5f3a3574
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:46:49 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_uptime.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit bdce6c4256ddc107c46e48c58fd73c8181f75a3e
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:45:55 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_update_record.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit a24e2ae0987cf7ac220d4eddf17069719cc6702d
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:44:21 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_tunables.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 7ffd56d3dde7fde33350ac530d9b1be70f879f21
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:42:50 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_traverse.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 28b33b5b2cf892b7509bd7c9e40a98edb0138691
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:40:19 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_takeover.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 2d0f917be963921d3655b942a582f2da72aa1010
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:31:34 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_statistics.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit b0f10a46f1b9bb419c3b60fbbbb7ed44e60f82e4
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:30:37 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_serverids.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit beadc5039da28c9578c9afd4d2784e41dcddf45c
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:28:56 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_server.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit c0a20b9e803ab86c7fe1b03c05e8ab3f41e74ed9
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:57:25 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_recoverd.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit af95b2f7020dd0ae6065b5d1046b108a052145a5
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:54:59 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_recover.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 19f87a0292bd52ac0e401cf045d1a2aa9bf457f8
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:25:24 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_persistent.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 9bb5e7dfab7d204b7a82e50c5bde88c5884e1634
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:23:18 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_monitor.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 3723eed63e3e1a18f173b581a5196f90237c1c72
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:21:13 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_ltdb_server.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit ae35699615b6719cfdb4844e406a867cacfbfd67
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:15:28 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_logging_syslog.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 930a620d80d376f44e2be992c8081b7fd094b642
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:14:53 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_logging_file.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit bc14982eda393e3dcf01bbfbf87127d5d20a736a
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:13:54 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_logging.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 8a4b342e0ebf22e22ea33cb88ddddb8384c27aa2
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:10:48 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_lock.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 568a4ce74b3fb872286cbc7e0ab98118ecb038e3
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:08:51 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_keepalive.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit d85e13bf441c3ef420d712e437e8ea2593d7c7e9
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:08:05 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_freeze.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 9c52c3df1ccdce3e98371a70dd0503d2bf4fdd58
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 15:04:17 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_daemon.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 740bb903878af4dfbd52d8575d4bc710134cbed6
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 14:58:14 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_control.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 171299d14886482f1641411c7719fec6977602f9
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 14:56:00 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_call.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 3132720ee8b8a4da9d09bcbab3469b18d4359123
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 14:48:44 2015 +1100
ctdb-include: Group function prototypes from server/ctdb_banning.c
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 8558b765726588e5712ff655c6a8c0f12a5dda3c
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 14:47:09 2015 +1100
ctdb-include: Group function prototypes from tcp and ib
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 46477877732f4fc6a0ed6603ead66d063ca5e5ce
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 14:17:34 2015 +1100
ctdb-daemon: Separate prototypes for common client/server functions
This groups function prototypes for common client/server functions in
common/common.h and removes them from ctdb_private.h.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit f1b9d8faf86c1b52206bfff7469740f0f9dcd919
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 27 15:26:26 2015 +1100
ctdb-common: Add missing prototype for ctdb_cmdline_client()
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit ded94c426b2e7758735a57ec2b5c7c62a1b4fc65
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 13:05:20 2015 +1100
ctdb-build: Calculate correct version when building from tarball
When building standalone ctdb from git repo, samba_version_file correctly
includes git sha in VERSION string. When building standalone ctdb from
tarball, samba_version_file puts UNKNOWN in the VERSION string.
Use the packaged include/ctdb_version.h file to set the correct git sha.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit f50ac680340ad2981ffac2b7ac0e2c746a17882c
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 13 17:57:49 2015 +1100
ctdb-daemon: Remove unused header file include/internal/includes.h
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 01c6c90e9818a52854a44e2303362fc39631df2a
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Oct 26 16:50:46 2015 +1100
ctdb-daemon: Remove dependency on includes.h
Instead of includes.h, include the required header files explicitly.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 2fdb332fad541efd34be749e55a07569ce2b4ef4
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Oct 26 16:50:09 2015 +1100
ctdb-daemon: Stop using tevent compatibility definitions
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 7084cb92e2b30134b2d5c9017a558f9e7b7696fe
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Oct 13 15:19:59 2015 +1100
ctdb-include: Move include/internal/cmdline.h to common/
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit b900adc55ce2609faf0b8acb62ab88507cddee42
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Oct 23 14:11:53 2015 +1100
ctdb-daemon: Separate prototypes for system specific functions
This groups function prototypes for system specific functions in
common/system.h and removes them from ctdb_private.h.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
-----------------------------------------------------------------------
Summary of changes:
ctdb/client/ctdb_client.c | 56 +-
ctdb/common/cmdline.c | 26 +-
ctdb/{include/internal => common}/cmdline.h | 5 +-
ctdb/common/common.h | 156 +++
ctdb/common/ctdb_fork.c | 19 +-
ctdb/common/ctdb_io.c | 40 +-
ctdb/common/ctdb_ltdb.c | 13 +-
ctdb/common/ctdb_util.c | 15 +-
ctdb/common/rb_tree.c | 8 +-
ctdb/common/system.h | 66 ++
ctdb/common/system_aix.c | 10 +-
ctdb/common/system_common.c | 7 +-
ctdb/common/system_freebsd.c | 10 +-
ctdb/common/system_gnu.c | 10 +-
ctdb/common/system_kfreebsd.c | 10 +-
ctdb/common/system_linux.c | 11 +-
ctdb/common/system_util.c | 8 +-
ctdb/ib/ibw_ctdb.c | 30 +-
ctdb/ib/ibw_ctdb.h | 5 +-
ctdb/ib/ibw_ctdb_init.c | 16 +-
ctdb/ib/ibwrapper.c | 46 +-
ctdb/ib/ibwrapper.h | 2 +-
ctdb/ib/ibwrapper_internal.h | 6 +-
ctdb/ib/ibwrapper_test.c | 40 +-
ctdb/include/ctdb_client.h | 823 ++++++++-------
ctdb/include/ctdb_logging.h | 8 -
ctdb/include/ctdb_private.h | 1310 +++++++++---------------
ctdb/include/ctdb_protocol.h | 283 +++++
ctdb/include/internal/includes.h | 25 -
ctdb/packaging/mkversion.sh | 13 +-
ctdb/server/ctdb_banning.c | 26 +-
ctdb/server/ctdb_call.c | 88 +-
ctdb/server/ctdb_control.c | 29 +-
ctdb/server/ctdb_daemon.c | 83 +-
ctdb/server/ctdb_event_helper.c | 9 +-
ctdb/server/ctdb_freeze.c | 17 +-
ctdb/server/ctdb_keepalive.c | 35 +-
ctdb/server/ctdb_lock.c | 24 +-
ctdb/server/ctdb_lock_helper.c | 9 +-
ctdb/server/ctdb_logging.c | 32 +-
ctdb/server/ctdb_logging_file.c | 15 +-
ctdb/server/ctdb_logging_syslog.c | 3 +
ctdb/server/ctdb_ltdb_server.c | 56 +-
ctdb/server/ctdb_monitor.c | 117 ++-
ctdb/server/ctdb_persistent.c | 28 +-
ctdb/server/ctdb_recover.c | 67 +-
ctdb/server/ctdb_recoverd.c | 143 +--
ctdb/server/ctdb_server.c | 23 +-
ctdb/server/ctdb_serverids.c | 15 +-
ctdb/server/ctdb_statistics.c | 27 +-
ctdb/server/ctdb_takeover.c | 124 ++-
ctdb/server/ctdb_traverse.c | 30 +-
ctdb/server/ctdb_tunables.c | 14 +-
ctdb/server/ctdb_update_record.c | 38 +-
ctdb/server/ctdb_uptime.c | 14 +-
ctdb/server/ctdb_vacuum.c | 87 +-
ctdb/server/ctdbd.c | 25 +-
ctdb/server/eventscript.c | 47 +-
ctdb/tcp/ctdb_tcp.h | 6 +-
ctdb/tcp/tcp_connect.c | 57 +-
ctdb/tcp/tcp_init.c | 28 +-
ctdb/tcp/tcp_io.c | 14 +-
ctdb/tests/src/ctdb_bench.c | 50 +-
ctdb/tests/src/ctdb_fetch.c | 37 +-
ctdb/tests/src/ctdb_fetch_one.c | 28 +-
ctdb/tests/src/ctdb_fetch_readonly_loop.c | 26 +-
ctdb/tests/src/ctdb_fetch_readonly_once.c | 24 +-
ctdb/tests/src/ctdb_lock_tdb.c | 6 +-
ctdb/tests/src/ctdb_persistent.c | 39 +-
ctdb/tests/src/ctdb_porting_tests.c | 22 +-
ctdb/tests/src/ctdb_randrec.c | 26 +-
ctdb/tests/src/ctdb_store.c | 29 +-
ctdb/tests/src/ctdb_trackingdb_test.c | 21 +-
ctdb/tests/src/ctdb_transaction.c | 38 +-
ctdb/tests/src/ctdb_traverse.c | 29 +-
ctdb/tests/src/ctdb_update_record.c | 25 +-
ctdb/tests/src/ctdb_update_record_persistent.c | 28 +-
ctdb/tests/src/ctdbd_test.c | 10 +-
ctdb/tests/src/rb_test.c | 19 +-
ctdb/tools/ctdb.c | 57 +-
ctdb/utils/pmda/pmda_ctdb.c | 23 +-
ctdb/wscript | 36 +-
82 files changed, 2934 insertions(+), 2046 deletions(-)
rename ctdb/{include/internal => common}/cmdline.h (58%)
create mode 100644 ctdb/common/common.h
create mode 100644 ctdb/common/system.h
delete mode 100644 ctdb/include/internal/includes.h
Changeset truncated at 500 lines:
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index b8e7e10..28f4358 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -18,17 +18,30 @@
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "includes.h"
-#include "lib/tdb_wrap/tdb_wrap.h"
-#include "tdb.h"
-#include "lib/util/dlinklist.h"
+#include "replace.h"
#include "system/network.h"
#include "system/filesys.h"
#include "system/locale.h"
-#include <stdlib.h>
-#include "../include/ctdb_private.h"
+
+#include <talloc.h>
+/* Allow use of deprecated function tevent_loop_allow_nesting() */
+#define TEVENT_DEPRECATED
+#include <tevent.h>
+#include <tdb.h>
+
+#include "lib/tdb_wrap/tdb_wrap.h"
#include "lib/util/dlinklist.h"
+#include "lib/util/time.h"
+#include "lib/util/debug.h"
+#include "lib/util/samba_util.h"
+
+#include "ctdb_logging.h"
+#include "ctdb_private.h"
+#include "ctdb_client.h"
+
#include "common/reqid.h"
+#include "common/system.h"
+#include "common/common.h"
/*
allocate a packet for use in client<->daemon communication
@@ -314,7 +327,7 @@ int ctdb_call_recv(struct ctdb_client_call_state *state, struct ctdb_call *call)
}
while (state->state < CTDB_CALL_DONE) {
- event_loop_once(state->ctdb_db->ctdb->ev);
+ tevent_loop_once(state->ctdb_db->ctdb->ev);
}
if (state->state != CTDB_CALL_DONE) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_call_recv failed\n"));
@@ -946,8 +959,9 @@ int ctdb_fetch(struct ctdb_db_context *ctdb_db, TALLOC_CTX *mem_ctx,
called when a control completes or timesout to invoke the callback
function the user provided
*/
-static void invoke_control_callback(struct event_context *ev, struct timed_event *te,
- struct timeval t, void *private_data)
+static void invoke_control_callback(struct tevent_context *ev,
+ struct tevent_timer *te,
+ struct timeval t, void *private_data)
{
struct ctdb_client_control_state *state;
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
@@ -1011,7 +1025,8 @@ static void ctdb_client_reply_control(struct ctdb_context *ctdb,
and call the callback.
*/
if (state->async.fn) {
- event_add_timed(ctdb->ev, state, timeval_zero(), invoke_control_callback, state);
+ tevent_add_timer(ctdb->ev, state, timeval_zero(),
+ invoke_control_callback, state);
}
}
@@ -1027,8 +1042,9 @@ static int ctdb_client_control_destructor(struct ctdb_client_control_state *stat
/* time out handler for ctdb_control */
-static void control_timeout_func(struct event_context *ev, struct timed_event *te,
- struct timeval t, void *private_data)
+static void control_timeout_func(struct tevent_context *ev,
+ struct tevent_timer *te,
+ struct timeval t, void *private_data)
{
struct ctdb_client_control_state *state = talloc_get_type(private_data, struct ctdb_client_control_state);
@@ -1042,7 +1058,8 @@ static void control_timeout_func(struct event_context *ev, struct timed_event *t
and call the callback.
*/
if (state->async.fn) {
- event_add_timed(state->ctdb->ev, state, timeval_zero(), invoke_control_callback, state);
+ tevent_add_timer(state->ctdb->ev, state, timeval_zero(),
+ invoke_control_callback, state);
}
}
@@ -1096,7 +1113,8 @@ struct ctdb_client_control_state *ctdb_control_send(struct ctdb_context *ctdb,
/* timeout */
if (timeout && !timeval_is_zero(timeout)) {
- event_add_timed(ctdb->ev, state, *timeout, control_timeout_func, state);
+ tevent_add_timer(ctdb->ev, state, *timeout,
+ control_timeout_func, state);
}
ret = ctdb_client_queue_pkt(ctdb, &(c->hdr));
@@ -1141,7 +1159,7 @@ int ctdb_control_recv(struct ctdb_context *ctdb,
completes.
*/
while (state->state == CTDB_CONTROL_WAIT) {
- event_loop_once(ctdb->ev);
+ tevent_loop_once(ctdb->ev);
}
if (state->state != CTDB_CONTROL_DONE) {
@@ -2292,7 +2310,7 @@ static int ctdb_traverse_ext(struct ctdb_db_context *ctdb_db,
}
while (!state.done) {
- event_loop_once(ctdb_db->ctdb->ev);
+ tevent_loop_once(ctdb_db->ctdb->ev);
}
ret = ctdb_client_remove_message_handler(ctdb_db->ctdb, srvid, &state);
@@ -3303,7 +3321,7 @@ int ctdb_ctrl_get_server_id_list(struct ctdb_context *ctdb,
NOTE: In current code the daemon does not fork. This is for testing purposes only
and to simplify the code.
*/
-struct ctdb_context *ctdb_init(struct event_context *ev)
+struct ctdb_context *ctdb_init(struct tevent_context *ev)
{
int ret;
struct ctdb_context *ctdb;
@@ -3506,7 +3524,7 @@ void ctdb_client_async_add(struct client_async_data *data, struct ctdb_client_co
int ctdb_client_async_wait(struct ctdb_context *ctdb, struct client_async_data *data)
{
while (data->count > 0) {
- event_loop_once(ctdb->ev);
+ tevent_loop_once(ctdb->ev);
}
if (data->fail_count != 0) {
if (!data->dont_log_errors) {
@@ -4416,7 +4434,7 @@ int switch_from_server_to_client(struct ctdb_context *ctdb, const char *fmt, ...
va_end(ap);
/* get a new event context */
- ctdb->ev = event_context_init(ctdb);
+ ctdb->ev = tevent_context_init(ctdb);
tevent_loop_allow_nesting(ctdb->ev);
/* Connect to main CTDB daemon */
diff --git a/ctdb/common/cmdline.c b/ctdb/common/cmdline.c
index 7fcb91f..69e8231 100644
--- a/ctdb/common/cmdline.c
+++ b/ctdb/common/cmdline.c
@@ -17,15 +17,25 @@
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "includes.h"
+#include "replace.h"
#include "system/filesys.h"
-#include "popt.h"
-#include "../include/ctdb_client.h"
-#include "../include/ctdb_private.h"
-#include "../common/rb_tree.h"
+#include "system/network.h"
+
+#include <popt.h>
+#include <talloc.h>
+#include <tevent.h>
#include <ctype.h>
-#include "internal/cmdline.h"
+#include "lib/util/debug.h"
+#include "ctdb_logging.h"
+#include "ctdb_private.h"
+#include "ctdb_client.h"
+
+#include "common/rb_tree.h"
+#include "common/common.h"
+#include "common/cmdline.h"
+
+
/* Handle common command line options for ctdb test progs
*/
@@ -49,7 +59,7 @@ static void ctdb_cmdline_callback(poptContext con,
{
switch (opt->val) {
case OPT_EVENTSYSTEM:
- event_set_default_backend(arg);
+ tevent_set_default_backend(arg);
break;
}
}
@@ -68,7 +78,7 @@ struct poptOption popt_ctdb_cmdline[] = {
/*
startup daemon side of ctdb according to command line options
*/
-struct ctdb_context *ctdb_cmdline_init(struct event_context *ev)
+struct ctdb_context *ctdb_cmdline_init(struct tevent_context *ev)
{
struct ctdb_context *ctdb;
int ret;
diff --git a/ctdb/include/internal/cmdline.h b/ctdb/common/cmdline.h
similarity index 58%
rename from ctdb/include/internal/cmdline.h
rename to ctdb/common/cmdline.h
index d8847a8..0285b4d 100644
--- a/ctdb/include/internal/cmdline.h
+++ b/ctdb/common/cmdline.h
@@ -5,6 +5,9 @@ extern struct poptOption popt_ctdb_cmdline[];
#define POPT_CTDB_CMDLINE { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_ctdb_cmdline, 0, "Common ctdb options:", NULL },
-struct ctdb_context *ctdb_cmdline_init(struct event_context *ev);
+struct ctdb_context *ctdb_cmdline_init(struct tevent_context *ev);
+
+struct ctdb_context *ctdb_cmdline_client(struct tevent_context *ev,
+ struct timeval req_timeout);
#endif /* CTDB_CMDLINE_H */
diff --git a/ctdb/common/common.h b/ctdb/common/common.h
new file mode 100644
index 0000000..49c5faf
--- /dev/null
+++ b/ctdb/common/common.h
@@ -0,0 +1,156 @@
+/*
+ ctdb database library
+
+ Copyright (C) Amitay Isaacs 2015
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __CTDB_COMMON_H__
+#define __CTDB_COMMON_H__
+
+/* From common/ctdb_fork.c */
+
+void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...);
+
+void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid);
+
+pid_t ctdb_fork(struct ctdb_context *ctdb);
+
+struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb);
+
+int ctdb_kill(struct ctdb_context *ctdb, pid_t pid, int signum);
+
+/* From common/ctdb_io.c */
+
+int ctdb_queue_length(struct ctdb_queue *queue);
+
+int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length);
+
+int ctdb_queue_set_fd(struct ctdb_queue *queue, int fd);
+
+struct ctdb_queue *ctdb_queue_setup(struct ctdb_context *ctdb,
+ TALLOC_CTX *mem_ctx, int fd, int alignment,
+ ctdb_queue_cb_fn_t callback,
+ void *private_data, const char *fmt, ...)
+ PRINTF_ATTRIBUTE(7,8);
+
+/* From common/ctdb_ltdb.c */
+
+struct ctdb_db_context *ctdb_db_handle(struct ctdb_context *ctdb,
+ const char *name);
+
+uint32_t ctdb_lmaster(struct ctdb_context *ctdb, const TDB_DATA *key);
+
+int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
+ TDB_DATA key, struct ctdb_ltdb_header *header,
+ TALLOC_CTX *mem_ctx, TDB_DATA *data);
+
+int ctdb_ltdb_fetch_with_header(struct ctdb_db_context *ctdb_db,
+ TDB_DATA key, struct ctdb_ltdb_header *header,
+ TALLOC_CTX *mem_ctx, TDB_DATA *data);
+
+int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key,
+ struct ctdb_ltdb_header *header, TDB_DATA data);
+
+int ctdb_ltdb_lock(struct ctdb_db_context *ctdb_db, TDB_DATA key);
+
+int ctdb_ltdb_unlock(struct ctdb_db_context *ctdb_db, TDB_DATA key);
+
+int ctdb_ltdb_delete(struct ctdb_db_context *ctdb_db, TDB_DATA key);
+
+int ctdb_trackingdb_add_pnn(struct ctdb_context *ctdb, TDB_DATA *data, uint32_t pnn);
+
+typedef void (*ctdb_trackingdb_cb)(struct ctdb_context *ctdb, uint32_t pnn,
+ void *private_data);
+
+void ctdb_trackingdb_traverse(struct ctdb_context *ctdb, TDB_DATA data,
+ ctdb_trackingdb_cb cb, void *private_data);
+
+int ctdb_null_func(struct ctdb_call_info *call);
+
+int ctdb_fetch_func(struct ctdb_call_info *call);
+
+int ctdb_fetch_with_header_func(struct ctdb_call_info *call);
+
+/* from common/ctdb_util.c */
+
+const char *ctdb_errstr(struct ctdb_context *ctdb);
+
+void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...);
+
+void ctdb_fatal(struct ctdb_context *ctdb, const char *msg);
+
+void ctdb_die(struct ctdb_context *ctdb, const char *msg);
+
+bool ctdb_set_helper(const char *type, char *helper, size_t size,
+ const char *envvar,
+ const char *dir, const char *file);
+
+void ctdb_external_trace(void);
+
+int ctdb_parse_address(TALLOC_CTX *mem_ctx, const char *str,
+ ctdb_sock_addr *address);
+
+bool ctdb_same_address(ctdb_sock_addr *a1, ctdb_sock_addr *a2);
+
+uint32_t ctdb_hash(const TDB_DATA *key);
+
+struct ctdb_rec_data *ctdb_marshall_record(TALLOC_CTX *mem_ctx, uint32_t reqid,
+ TDB_DATA key,
+ struct ctdb_ltdb_header *header,
+ TDB_DATA data);
+
+struct ctdb_marshall_buffer *ctdb_marshall_add(TALLOC_CTX *mem_ctx,
+ struct ctdb_marshall_buffer *m,
+ uint64_t db_id,
+ uint32_t reqid,
+ TDB_DATA key,
+ struct ctdb_ltdb_header *header,
+ TDB_DATA data);
+
+TDB_DATA ctdb_marshall_finish(struct ctdb_marshall_buffer *m);
+
+struct ctdb_rec_data *ctdb_marshall_loop_next(struct ctdb_marshall_buffer *m,
+ struct ctdb_rec_data *r,
+ uint32_t *reqid,
+ struct ctdb_ltdb_header *header,
+ TDB_DATA *key, TDB_DATA *data);
+
+void ctdb_canonicalize_ip(const ctdb_sock_addr *ip, ctdb_sock_addr *cip);
+
+bool ctdb_same_ip(const ctdb_sock_addr *tip1, const ctdb_sock_addr *tip2);
+
+bool ctdb_same_sockaddr(const ctdb_sock_addr *ip1, const ctdb_sock_addr *ip2);
+
+char *ctdb_addr_to_str(ctdb_sock_addr *addr);
+
+unsigned ctdb_addr_to_port(ctdb_sock_addr *addr);
+
+struct ctdb_node_map *ctdb_read_nodes_file(TALLOC_CTX *mem_ctx,
+ const char *nlist);
+
+struct ctdb_node_map *ctdb_node_list_to_map(struct ctdb_node **nodes,
+ uint32_t num_nodes,
+ TALLOC_CTX *mem_ctx);
+
+const char *runstate_to_string(enum ctdb_runstate runstate);
+
+enum ctdb_runstate runstate_from_string(const char *label);
+
+void ctdb_set_runstate(struct ctdb_context *ctdb, enum ctdb_runstate runstate);
+
+uint32_t *ctdb_key_to_idkey(TALLOC_CTX *mem_ctx, TDB_DATA key);
+
+#endif /* __CTDB_COMMON_H__ */
diff --git a/ctdb/common/ctdb_fork.c b/ctdb/common/ctdb_fork.c
index 8d38150..46b0a13 100644
--- a/ctdb/common/ctdb_fork.c
+++ b/ctdb/common/ctdb_fork.c
@@ -17,11 +17,22 @@
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "includes.h"
+#include "replace.h"
#include "system/wait.h"
-#include "../include/ctdb_client.h"
-#include "../include/ctdb_private.h"
-#include "../common/rb_tree.h"
+#include "system/network.h"
+
+#include <talloc.h>
+#include <tevent.h>
+
+#include "lib/util/debug.h"
+
+#include "ctdb_logging.h"
+#include "ctdb_private.h"
+#include "ctdb_client.h"
+
+#include "common/rb_tree.h"
+#include "common/system.h"
+#include "common/common.h"
void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...)
{
diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c
index 53486f4..fca9be0 100644
--- a/ctdb/common/ctdb_io.c
+++ b/ctdb/common/ctdb_io.c
@@ -20,14 +20,23 @@
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "includes.h"
-#include "tdb.h"
-#include "lib/util/dlinklist.h"
+#include "replace.h"
#include "system/network.h"
#include "system/filesys.h"
-#include "../include/ctdb_private.h"
-#include "../include/ctdb_client.h"
-#include <stdarg.h>
+
+#include <tdb.h>
+#include <talloc.h>
+#include <tevent.h>
+
+#include "lib/util/dlinklist.h"
+#include "lib/util/debug.h"
+
+#include "ctdb_logging.h"
+#include "ctdb_private.h"
+#include "ctdb_client.h"
+
+#include "common/system.h"
+#include "common/common.h"
#define QUEUE_BUFFER_SIZE (16*1024)
@@ -53,7 +62,7 @@ struct ctdb_queue {
struct ctdb_buffer buffer; /* input buffer */
struct ctdb_queue_pkt *out_queue, *out_queue_tail;
uint32_t out_queue_length;
- struct fd_event *fde;
+ struct tevent_fd *fde;
int fd;
size_t alignment;
void *private_data;
@@ -215,7 +224,7 @@ failed:
/* used when an event triggers a dead queue */
-static void queue_dead(struct event_context *ev, struct tevent_immediate *im,
+static void queue_dead(struct tevent_context *ev, struct tevent_immediate *im,
void *private_data)
{
struct ctdb_queue *queue = talloc_get_type(private_data, struct ctdb_queue);
@@ -264,18 +273,18 @@ static void queue_io_write(struct ctdb_queue *queue)
talloc_free(pkt);
}
- EVENT_FD_NOT_WRITEABLE(queue->fde);
+ TEVENT_FD_NOT_WRITEABLE(queue->fde);
}
/*
called when an incoming connection is readable or writeable
*/
-static void queue_io_handler(struct event_context *ev, struct fd_event *fde,
+static void queue_io_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private_data)
{
struct ctdb_queue *queue = talloc_get_type(private_data, struct ctdb_queue);
- if (flags & EVENT_FD_READ) {
+ if (flags & TEVENT_FD_READ) {
queue_io_read(queue);
} else {
queue_io_write(queue);
@@ -340,7 +349,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length)
pkt->full_length = full_length;
if (queue->out_queue == NULL && queue->fd != -1) {
- EVENT_FD_WRITEABLE(queue->fde);
+ TEVENT_FD_WRITEABLE(queue->fde);
}
DLIST_ADD_END(queue->out_queue, pkt, NULL);
@@ -383,15 +392,16 @@ int ctdb_queue_set_fd(struct ctdb_queue *queue, int fd)
queue->fde = NULL;
--
Samba Shared Repository
More information about the samba-cvs
mailing list