1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00

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@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2015-10-23 14:17:34 +11:00 committed by Martin Schwenke
parent f1b9d8faf8
commit 4647787773
54 changed files with 242 additions and 131 deletions

View File

@ -41,6 +41,7 @@
#include "common/reqid.h"
#include "common/system.h"
#include "common/common.h"
/*
allocate a packet for use in client<->daemon communication

View File

@ -32,6 +32,7 @@
#include "ctdb_client.h"
#include "common/rb_tree.h"
#include "common/common.h"
#include "common/cmdline.h"

156
ctdb/common/common.h Normal file
View File

@ -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__ */

View File

@ -32,6 +32,7 @@
#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, ...)
{

View File

@ -36,6 +36,7 @@
#include "ctdb_client.h"
#include "common/system.h"
#include "common/common.h"
#define QUEUE_BUFFER_SIZE (16*1024)

View File

@ -31,6 +31,8 @@
#include "ctdb_logging.h"
#include "ctdb_private.h"
#include "common/common.h"
/*
find an attached ctdb_db handle given a name
*/

View File

@ -32,6 +32,7 @@
#include "common/reqid.h"
#include "common/system.h"
#include "common/common.h"
/*
return error string for last error

View File

@ -33,6 +33,8 @@
#include "ctdb_logging.h"
#include "ctdb_private.h"
#include "common/common.h"
#include "ibwrapper.h"
#include "ibw_ctdb.h"

View File

@ -33,6 +33,8 @@
#include "ctdb_logging.h"
#include "ctdb_private.h"
#include "common/common.h"
#include "ibwrapper.h"
#include "ibw_ctdb.h"

View File

@ -96,16 +96,6 @@ struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb,
int ctdb_detach(struct ctdb_context *ctdb, uint32_t db_id);
/*
find an attached ctdb_db handle given a name
*/
struct ctdb_db_context *ctdb_db_handle(struct ctdb_context *ctdb, const char *name);
/*
error string for last ctdb error
*/
const char *ctdb_errstr(struct ctdb_context *);
/* a ctdb call function */
typedef int (*ctdb_fn_t)(struct ctdb_call_info *);
@ -164,9 +154,6 @@ int ctdb_fetch(struct ctdb_db_context *ctdb_db, TALLOC_CTX *mem_ctx,
struct ctdb_db_context *find_ctdb_db(struct ctdb_context *ctdb, uint32_t id);
struct ctdb_context *ctdb_cmdline_client(struct tevent_context *ev,
struct timeval req_timeout);
struct ctdb_statistics;
int ctdb_ctrl_statistics(struct ctdb_context *ctdb, uint32_t destnode, struct ctdb_statistics *status);
int ctdb_ctrl_dbstatistics(struct ctdb_context *ctdb, uint32_t destnode, uint32_t dbid,
@ -497,15 +484,6 @@ struct ctdb_client_control_state *ctdb_ctrl_getcapabilities_send(struct ctdb_con
int ctdb_ctrl_getcapabilities_recv(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct ctdb_client_control_state *state, uint32_t *capabilities);
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_transaction_handle *ctdb_transaction_start(struct ctdb_db_context *ctdb_db,
TALLOC_CTX *mem_ctx);
int ctdb_transaction_fetch(struct ctdb_transaction_handle *h,

View File

@ -411,10 +411,6 @@ enum ctdb_runstate {
CTDB_RUNSTATE_SHUTDOWN,
};
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);
void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code);
#define CTDB_MONITORING_ACTIVE 0
@ -677,19 +673,6 @@ struct ctdb_fetch_handle {
};
/* internal prototypes */
void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
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);
bool ctdb_same_address(ctdb_sock_addr *a1, ctdb_sock_addr *a2);
int ctdb_parse_address(TALLOC_CTX *mem_ctx, const char *str,
ctdb_sock_addr *address);
bool ctdb_same_ip(const ctdb_sock_addr *ip1, const ctdb_sock_addr *ip2);
bool ctdb_same_sockaddr(const ctdb_sock_addr *ip1, const ctdb_sock_addr *ip2);
uint32_t ctdb_hash(const TDB_DATA *key);
uint32_t *ctdb_key_to_idkey(TALLOC_CTX *mem_ctx, TDB_DATA key);
void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
@ -698,16 +681,6 @@ void ctdb_reply_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
void ctdb_reply_error(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
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_store(struct ctdb_db_context *ctdb_db, TDB_DATA key,
struct ctdb_ltdb_header *header, TDB_DATA data);
int ctdb_ltdb_delete(struct ctdb_db_context *ctdb_db, TDB_DATA key);
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);
int32_t ctdb_control_start_persistent_update(struct ctdb_context *ctdb,
struct ctdb_req_control *c,
TDB_DATA recdata);
@ -735,26 +708,6 @@ struct ctdb_call_state *ctdb_call_local_send(struct ctdb_db_context *ctdb_db,
int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork);
/*
queue a packet for sending
*/
int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length);
/*
setup the fd used by the queue
*/
int ctdb_queue_set_fd(struct ctdb_queue *queue, int fd);
/*
setup a packet queue on a socket
*/
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);
/*
allocate a packet for use in client<->daemon communication
*/
@ -774,19 +727,6 @@ struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
#define ctdb_transport_allocate(ctdb, mem_ctx, operation, length, type) \
(type *)_ctdb_transport_allocate(ctdb, mem_ctx, operation, length, sizeof(type), #type)
int ctdb_queue_length(struct ctdb_queue *queue);
/*
lock a record in the ltdb, given a key
*/
int ctdb_ltdb_lock(struct ctdb_db_context *ctdb_db, TDB_DATA key);
/*
unlock a record in the ltdb, given a key
*/
int ctdb_ltdb_unlock(struct ctdb_db_context *ctdb_db, TDB_DATA key);
int ctdb_client_send_message(struct ctdb_context *ctdb, uint32_t vnn,
uint64_t srvid, TDB_DATA data);
@ -956,14 +896,6 @@ int daemon_check_srvids(struct ctdb_context *ctdb, TDB_DATA indata,
int32_t ctdb_ltdb_enable_seqnum(struct ctdb_context *ctdb, uint32_t db_id);
int32_t ctdb_ltdb_update_seqnum(struct ctdb_context *ctdb, uint32_t db_id, uint32_t srcnode);
struct ctdb_rec_data *ctdb_marshall_record(TALLOC_CTX *mem_ctx, uint32_t reqid,
TDB_DATA key, struct ctdb_ltdb_header *, TDB_DATA data);
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);
int32_t ctdb_control_pull_db(struct ctdb_context *ctdb, TDB_DATA indata, TDB_DATA *outdata);
int32_t ctdb_control_push_db(struct ctdb_context *ctdb, TDB_DATA indata);
@ -1011,12 +943,6 @@ void ctdb_node_dead(struct ctdb_node *node);
void ctdb_node_connected(struct ctdb_node *node);
bool ctdb_blocking_freeze(struct ctdb_context *ctdb);
struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb);
void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid);
pid_t ctdb_fork(struct ctdb_context *ctdb);
void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...);
int ctdb_kill(struct ctdb_context *ctdb, pid_t pid, int signum);
int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
struct ctdb_req_control *c,
TDB_DATA indata,
@ -1262,11 +1188,6 @@ int ctdb_client_async_control(struct ctdb_context *ctdb,
client_async_callback fail_callback,
void *callback_data);
struct ctdb_node_map *
ctdb_node_list_to_map(struct ctdb_node **nodes, uint32_t num_nodes,
TALLOC_CTX *mem_ctx);
struct ctdb_node_map *ctdb_read_nodes_file(TALLOC_CTX *mem_ctx,
const char *nlist);
void ctdb_load_nodes_file(struct ctdb_context *ctdb);
int ctdb_control_reload_nodes_file(struct ctdb_context *ctdb, uint32_t opcode);
@ -1274,10 +1195,6 @@ int ctdb_control_reload_nodes_file(struct ctdb_context *ctdb, uint32_t opcode);
int32_t ctdb_dump_memory(struct ctdb_context *ctdb, TDB_DATA *outdata);
int32_t ctdb_control_get_capabilities(struct ctdb_context *ctdb, TDB_DATA *outdata);
char *ctdb_addr_to_str(ctdb_sock_addr *addr);
unsigned ctdb_addr_to_port(ctdb_sock_addr *addr);
void ctdb_canonicalize_ip(const ctdb_sock_addr *ip, ctdb_sock_addr *cip);
int32_t ctdb_control_recd_ping(struct ctdb_context *ctdb);
int32_t ctdb_control_set_recmaster(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata);
@ -1381,12 +1298,6 @@ void ctdb_local_remove_from_delete_queue(struct ctdb_db_context *ctdb_db,
struct ctdb_ltdb_header *ctdb_header_from_record_handle(struct ctdb_record_handle *h);
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_start_revoke_ro_record(struct ctdb_context *ctdb, struct ctdb_db_context *ctdb_db, TDB_DATA key, struct ctdb_ltdb_header *header, TDB_DATA data);
typedef void (*deferred_requeue_fn)(void *call_context, struct ctdb_req_header *hdr);
@ -1395,12 +1306,6 @@ int ctdb_add_revoke_deferred_call(struct ctdb_context *ctdb, struct ctdb_db_cont
int ctdb_set_db_readonly(struct ctdb_context *ctdb, struct ctdb_db_context *ctdb_db);
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);
void ctdb_db_statistics_reset(struct ctdb_db_context *ctdb_db);
int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,

View File

@ -32,6 +32,7 @@
#include "ctdb_client.h"
#include "ctdb_logging.h"
#include "common/common.h"
static void ctdb_ban_node_event(struct tevent_context *ev,
struct tevent_timer *te,

View File

@ -38,6 +38,7 @@
#include "common/rb_tree.h"
#include "common/reqid.h"
#include "common/system.h"
#include "common/common.h"
struct ctdb_sticky_record {
struct ctdb_context *ctdb;

View File

@ -35,6 +35,7 @@
#include "ctdb_logging.h"
#include "common/reqid.h"
#include "common/common.h"
struct ctdb_control_state {

View File

@ -42,6 +42,7 @@
#include "common/rb_tree.h"
#include "common/reqid.h"
#include "common/system.h"
#include "common/common.h"
struct ctdb_client_pid_list {
struct ctdb_client_pid_list *next, *prev;

View File

@ -32,7 +32,7 @@
#include "ctdb_logging.h"
#include "common/rb_tree.h"
#include "common/common.h"
/**
* Cancel a transaction on database

View File

@ -33,6 +33,8 @@
#include "ctdb_private.h"
#include "ctdb_logging.h"
#include "common/common.h"
/*
see if any nodes are dead

View File

@ -34,6 +34,7 @@
#include "ctdb_logging.h"
#include "common/system.h"
#include "common/common.h"
/*
* Non-blocking Locking API

View File

@ -34,6 +34,7 @@
#include "ctdb_logging.h"
#include "common/system.h"
#include "common/common.h"
struct ctdb_log_backend {
struct ctdb_log_backend *prev, *next;

View File

@ -39,6 +39,7 @@
#include "common/rb_tree.h"
#include "common/reqid.h"
#include "common/system.h"
#include "common/common.h"
#define PERSISTENT_HEALTH_TDB "persistent_health.tdb"

View File

@ -33,6 +33,7 @@
#include "ctdb_logging.h"
#include "common/system.h"
#include "common/common.h"
struct ctdb_monitor_state {
uint32_t monitoring_mode;

View File

@ -35,6 +35,7 @@
#include "ctdb_logging.h"
#include "common/reqid.h"
#include "common/common.h"
struct ctdb_persistent_state {
struct ctdb_context *ctdb;

View File

@ -37,6 +37,7 @@
#include "ctdb_logging.h"
#include "common/system.h"
#include "common/common.h"
int
ctdb_control_getvnnmap(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata, TDB_DATA *outdata)

View File

@ -39,6 +39,7 @@
#include "common/system.h"
#include "common/cmdline.h"
#include "common/common.h"
/* List of SRVID requests that need to be processed */

View File

@ -32,6 +32,8 @@
#include "ctdb_client.h"
#include "ctdb_logging.h"
#include "common/common.h"
/*
choose the transport we will use
*/

View File

@ -28,6 +28,7 @@
#include "common/rb_tree.h"
#include "common/reqid.h"
#include "common/common.h"
#define SERVER_ID_KEY_SIZE 3

View File

@ -38,6 +38,7 @@
#include "common/rb_tree.h"
#include "common/reqid.h"
#include "common/system.h"
#include "common/common.h"
#define TAKEOVER_TIMEOUT() timeval_current_ofs(ctdb->tunable.takeover_timeout,0)

View File

@ -37,6 +37,7 @@
#include "common/reqid.h"
#include "common/system.h"
#include "common/common.h"
typedef void (*ctdb_traverse_fn_t)(void *private_data, TDB_DATA key, TDB_DATA data);

View File

@ -27,6 +27,8 @@
#include "ctdb_private.h"
#include "ctdb_logging.h"
#include "common/common.h"
static const struct {
const char *name;
uint32_t default_v;

View File

@ -34,6 +34,7 @@
#include "ctdb_logging.h"
#include "common/system.h"
#include "common/common.h"
struct ctdb_persistent_write_state {
struct ctdb_db_context *ctdb_db;

View File

@ -31,6 +31,8 @@
#include "ctdb_client.h"
#include "ctdb_logging.h"
#include "common/common.h"
/*
returns the ctdb uptime
*/

View File

@ -38,6 +38,7 @@
#include "common/rb_tree.h"
#include "common/system.h"
#include "common/common.h"
#define TIMELIMIT() timeval_current_ofs(10, 0)

View File

@ -38,6 +38,7 @@
#include "common/reqid.h"
#include "common/system.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct {
const char *nlist;

View File

@ -37,6 +37,7 @@
#include "common/rb_tree.h"
#include "common/system.h"
#include "common/common.h"
static void ctdb_event_script_timeout(struct tevent_context *ev,

View File

@ -32,6 +32,7 @@
#include "ctdb_private.h"
#include "common/system.h"
#include "common/common.h"
#include "ctdb_tcp.h"

View File

@ -30,6 +30,8 @@
#include "ctdb_logging.h"
#include "ctdb_private.h"
#include "common/common.h"
#include "ctdb_tcp.h"
static int tnode_destructor(struct ctdb_tcp_node *tnode)

View File

@ -27,6 +27,8 @@
#include "ctdb_logging.h"
#include "ctdb_private.h"
#include "common/common.h"
#include "ctdb_tcp.h"

View File

@ -28,12 +28,13 @@
#include "lib/util/time.h"
#include "lib/util/debug.h"
#include "common/cmdline.h"
#include "ctdb_logging.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct timeval tp1,tp2;
static void start_timer(void)

View File

@ -30,9 +30,11 @@
#include "lib/util/time.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct timeval tp1,tp2;

View File

@ -29,9 +29,11 @@
#include "lib/util/time.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static int timelimit = 10;
static int lock_count = 0;

View File

@ -34,6 +34,7 @@
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct ctdb_db_context *ctdb_db;

View File

@ -29,8 +29,12 @@
#include "lib/util/time.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
#include "common/common.h"
#include "common/cmdline.h"
const char *TESTKEY = "testkey";
/*

View File

@ -30,11 +30,13 @@
#include "lib/util/debug.h"
#include "lib/util/time.h"
#include "common/cmdline.h"
#include "ctdb_private.h"
#include "ctdb_logging.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct timeval tp1,tp2;
static void start_timer(void)

View File

@ -28,11 +28,13 @@
#include "lib/util/debug.h"
#include "ctdb_private.h"
#include "ctdb_logging.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/system.h"
#include "common/common.h"
static struct {

View File

@ -30,12 +30,13 @@
#include "lib/util/debug.h"
#include "lib/util/time.h"
#include "common/cmdline.h"
#include "ctdb_logging.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct timeval tp1,tp2;
static void start_timer(void)

View File

@ -29,10 +29,12 @@
#include "lib/util/time.h"
#include "common/cmdline.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static int num_records = 10;
static int base_rec;

View File

@ -34,10 +34,11 @@
#include "lib/tdb_wrap/tdb_wrap.h"
#include "lib/util/time.h"
#include "common/cmdline.h"
#include "ctdb_private.h"
#include "common/cmdline.h"
#include "common/common.h"
#define MAXINDEX 64
char indices[MAXINDEX];

View File

@ -30,10 +30,12 @@
#include "lib/util/debug.h"
#include "lib/util/time.h"
#include "ctdb_private.h"
#include "ctdb_logging.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct timeval tp1,tp2;

View File

@ -29,10 +29,12 @@
#include "lib/util/time.h"
#include "common/cmdline.h"
#include "ctdb_private.h"
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static const char *dbname = "test.tdb";
static int traverse_callback(TDB_DATA key, TDB_DATA data, void *private_data)

View File

@ -32,6 +32,7 @@
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct ctdb_db_context *ctdb_db;

View File

@ -33,6 +33,7 @@
#include "ctdb_client.h"
#include "common/cmdline.h"
#include "common/common.h"
static void update_once(struct ctdb_context *ctdb, struct tevent_context *ev,

View File

@ -19,6 +19,7 @@
#include "replace.h"
#include "system/filesys.h"
#include "system/network.h"
#include "system/time.h"
#include <popt.h>
@ -27,8 +28,11 @@
#include "lib/util/dlinklist.h"
#include "common/cmdline.h"
#include "ctdb_private.h"
#include "common/rb_tree.h"
#include "common/cmdline.h"
#include "common/common.h"
static struct timeval tp1,tp2;

View File

@ -45,6 +45,7 @@
#include "common/cmdline.h"
#include "common/rb_tree.h"
#include "common/system.h"
#include "common/common.h"
#define ERR_TIMEOUT 20 /* timed out trying to reach node */
#define ERR_NONODE 21 /* node does not exist */

View File

@ -32,6 +32,7 @@
#include "ctdb_protocol.h"
#include "common/system.h"
#include "common/common.h"
#include <pcp/pmapi.h>
#include <pcp/impl.h>