mirror of
https://github.com/samba-team/samba.git
synced 2025-01-05 09:18:06 +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:
parent
f1b9d8faf8
commit
4647787773
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
allocate a packet for use in client<->daemon communication
|
allocate a packet for use in client<->daemon communication
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
|
#include "common/common.h"
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
|
||||||
|
|
||||||
|
156
ctdb/common/common.h
Normal file
156
ctdb/common/common.h
Normal 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__ */
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...)
|
void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#define QUEUE_BUFFER_SIZE (16*1024)
|
#define QUEUE_BUFFER_SIZE (16*1024)
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
find an attached ctdb_db handle given a name
|
find an attached ctdb_db handle given a name
|
||||||
*/
|
*/
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
return error string for last error
|
return error string for last error
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#include "ibwrapper.h"
|
#include "ibwrapper.h"
|
||||||
#include "ibw_ctdb.h"
|
#include "ibw_ctdb.h"
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#include "ibwrapper.h"
|
#include "ibwrapper.h"
|
||||||
#include "ibw_ctdb.h"
|
#include "ibw_ctdb.h"
|
||||||
|
|
||||||
|
@ -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);
|
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 */
|
/* a ctdb call function */
|
||||||
typedef int (*ctdb_fn_t)(struct ctdb_call_info *);
|
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_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;
|
struct ctdb_statistics;
|
||||||
int ctdb_ctrl_statistics(struct ctdb_context *ctdb, uint32_t destnode, struct ctdb_statistics *status);
|
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,
|
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);
|
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,
|
struct ctdb_transaction_handle *ctdb_transaction_start(struct ctdb_db_context *ctdb_db,
|
||||||
TALLOC_CTX *mem_ctx);
|
TALLOC_CTX *mem_ctx);
|
||||||
int ctdb_transaction_fetch(struct ctdb_transaction_handle *h,
|
int ctdb_transaction_fetch(struct ctdb_transaction_handle *h,
|
||||||
|
@ -411,10 +411,6 @@ enum ctdb_runstate {
|
|||||||
CTDB_RUNSTATE_SHUTDOWN,
|
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);
|
void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code);
|
||||||
|
|
||||||
#define CTDB_MONITORING_ACTIVE 0
|
#define CTDB_MONITORING_ACTIVE 0
|
||||||
@ -677,19 +673,6 @@ struct ctdb_fetch_handle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* internal prototypes */
|
/* 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_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
|
||||||
void ctdb_request_dmaster(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_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
|
||||||
void ctdb_reply_error(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,
|
int32_t ctdb_control_start_persistent_update(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control *c,
|
||||||
TDB_DATA recdata);
|
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);
|
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
|
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) \
|
#define ctdb_transport_allocate(ctdb, mem_ctx, operation, length, type) \
|
||||||
(type *)_ctdb_transport_allocate(ctdb, mem_ctx, operation, length, sizeof(type), #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,
|
int ctdb_client_send_message(struct ctdb_context *ctdb, uint32_t vnn,
|
||||||
uint64_t srvid, TDB_DATA data);
|
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_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);
|
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_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);
|
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);
|
void ctdb_node_connected(struct ctdb_node *node);
|
||||||
bool ctdb_blocking_freeze(struct ctdb_context *ctdb);
|
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,
|
int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control *c,
|
||||||
TDB_DATA indata,
|
TDB_DATA indata,
|
||||||
@ -1262,11 +1188,6 @@ int ctdb_client_async_control(struct ctdb_context *ctdb,
|
|||||||
client_async_callback fail_callback,
|
client_async_callback fail_callback,
|
||||||
void *callback_data);
|
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);
|
void ctdb_load_nodes_file(struct ctdb_context *ctdb);
|
||||||
|
|
||||||
int ctdb_control_reload_nodes_file(struct ctdb_context *ctdb, uint32_t opcode);
|
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_dump_memory(struct ctdb_context *ctdb, TDB_DATA *outdata);
|
||||||
int32_t ctdb_control_get_capabilities(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_recd_ping(struct ctdb_context *ctdb);
|
||||||
int32_t ctdb_control_set_recmaster(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata);
|
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);
|
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);
|
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);
|
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_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);
|
void ctdb_db_statistics_reset(struct ctdb_db_context *ctdb_db);
|
||||||
|
|
||||||
int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static void ctdb_ban_node_event(struct tevent_context *ev,
|
static void ctdb_ban_node_event(struct tevent_context *ev,
|
||||||
struct tevent_timer *te,
|
struct tevent_timer *te,
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
struct ctdb_sticky_record {
|
struct ctdb_sticky_record {
|
||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
struct ctdb_control_state {
|
struct ctdb_control_state {
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
struct ctdb_client_pid_list {
|
struct ctdb_client_pid_list {
|
||||||
struct ctdb_client_pid_list *next, *prev;
|
struct ctdb_client_pid_list *next, *prev;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancel a transaction on database
|
* Cancel a transaction on database
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
see if any nodes are dead
|
see if any nodes are dead
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Non-blocking Locking API
|
* Non-blocking Locking API
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
struct ctdb_log_backend {
|
struct ctdb_log_backend {
|
||||||
struct ctdb_log_backend *prev, *next;
|
struct ctdb_log_backend *prev, *next;
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#define PERSISTENT_HEALTH_TDB "persistent_health.tdb"
|
#define PERSISTENT_HEALTH_TDB "persistent_health.tdb"
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
struct ctdb_monitor_state {
|
struct ctdb_monitor_state {
|
||||||
uint32_t monitoring_mode;
|
uint32_t monitoring_mode;
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
struct ctdb_persistent_state {
|
struct ctdb_persistent_state {
|
||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
ctdb_control_getvnnmap(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata, TDB_DATA *outdata)
|
ctdb_control_getvnnmap(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata, TDB_DATA *outdata)
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
/* List of SRVID requests that need to be processed */
|
/* List of SRVID requests that need to be processed */
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
choose the transport we will use
|
choose the transport we will use
|
||||||
*/
|
*/
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
#define SERVER_ID_KEY_SIZE 3
|
#define SERVER_ID_KEY_SIZE 3
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
#define TAKEOVER_TIMEOUT() timeval_current_ofs(ctdb->tunable.takeover_timeout,0)
|
#define TAKEOVER_TIMEOUT() timeval_current_ofs(ctdb->tunable.takeover_timeout,0)
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
typedef void (*ctdb_traverse_fn_t)(void *private_data, TDB_DATA key, TDB_DATA data);
|
typedef void (*ctdb_traverse_fn_t)(void *private_data, TDB_DATA key, TDB_DATA data);
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
uint32_t default_v;
|
uint32_t default_v;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
struct ctdb_persistent_write_state {
|
struct ctdb_persistent_write_state {
|
||||||
struct ctdb_db_context *ctdb_db;
|
struct ctdb_db_context *ctdb_db;
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
returns the ctdb uptime
|
returns the ctdb uptime
|
||||||
*/
|
*/
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#define TIMELIMIT() timeval_current_ofs(10, 0)
|
#define TIMELIMIT() timeval_current_ofs(10, 0)
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "common/reqid.h"
|
#include "common/reqid.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
const char *nlist;
|
const char *nlist;
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
static void ctdb_event_script_timeout(struct tevent_context *ev,
|
static void ctdb_event_script_timeout(struct tevent_context *ev,
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#include "ctdb_tcp.h"
|
#include "ctdb_tcp.h"
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#include "ctdb_tcp.h"
|
#include "ctdb_tcp.h"
|
||||||
|
|
||||||
static int tnode_destructor(struct ctdb_tcp_node *tnode)
|
static int tnode_destructor(struct ctdb_tcp_node *tnode)
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#include "ctdb_tcp.h"
|
#include "ctdb_tcp.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,12 +28,13 @@
|
|||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
#include "lib/util/debug.h"
|
#include "lib/util/debug.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
|
||||||
|
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct timeval tp1,tp2;
|
static struct timeval tp1,tp2;
|
||||||
|
|
||||||
static void start_timer(void)
|
static void start_timer(void)
|
||||||
|
@ -30,9 +30,11 @@
|
|||||||
|
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
static struct timeval tp1,tp2;
|
static struct timeval tp1,tp2;
|
||||||
|
@ -29,9 +29,11 @@
|
|||||||
|
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static int timelimit = 10;
|
static int timelimit = 10;
|
||||||
static int lock_count = 0;
|
static int lock_count = 0;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct ctdb_db_context *ctdb_db;
|
static struct ctdb_db_context *ctdb_db;
|
||||||
|
|
||||||
|
@ -29,8 +29,12 @@
|
|||||||
|
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
|
#include "common/common.h"
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
|
||||||
const char *TESTKEY = "testkey";
|
const char *TESTKEY = "testkey";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -30,11 +30,13 @@
|
|||||||
#include "lib/util/debug.h"
|
#include "lib/util/debug.h"
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct timeval tp1,tp2;
|
static struct timeval tp1,tp2;
|
||||||
|
|
||||||
static void start_timer(void)
|
static void start_timer(void)
|
||||||
|
@ -28,11 +28,13 @@
|
|||||||
|
|
||||||
#include "lib/util/debug.h"
|
#include "lib/util/debug.h"
|
||||||
|
|
||||||
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
|
@ -30,12 +30,13 @@
|
|||||||
#include "lib/util/debug.h"
|
#include "lib/util/debug.h"
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
|
||||||
|
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct timeval tp1,tp2;
|
static struct timeval tp1,tp2;
|
||||||
|
|
||||||
static void start_timer(void)
|
static void start_timer(void)
|
||||||
|
@ -29,10 +29,12 @@
|
|||||||
|
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static int num_records = 10;
|
static int num_records = 10;
|
||||||
static int base_rec;
|
static int base_rec;
|
||||||
|
|
||||||
|
@ -34,10 +34,11 @@
|
|||||||
#include "lib/tdb_wrap/tdb_wrap.h"
|
#include "lib/tdb_wrap/tdb_wrap.h"
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
|
||||||
|
|
||||||
#include "ctdb_private.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#define MAXINDEX 64
|
#define MAXINDEX 64
|
||||||
char indices[MAXINDEX];
|
char indices[MAXINDEX];
|
||||||
|
|
||||||
|
@ -30,10 +30,12 @@
|
|||||||
#include "lib/util/debug.h"
|
#include "lib/util/debug.h"
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
|
#include "ctdb_private.h"
|
||||||
#include "ctdb_logging.h"
|
#include "ctdb_logging.h"
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct timeval tp1,tp2;
|
static struct timeval tp1,tp2;
|
||||||
|
|
||||||
|
@ -29,10 +29,12 @@
|
|||||||
|
|
||||||
#include "lib/util/time.h"
|
#include "lib/util/time.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static const char *dbname = "test.tdb";
|
static const char *dbname = "test.tdb";
|
||||||
|
|
||||||
static int traverse_callback(TDB_DATA key, TDB_DATA data, void *private_data)
|
static int traverse_callback(TDB_DATA key, TDB_DATA data, void *private_data)
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct ctdb_db_context *ctdb_db;
|
static struct ctdb_db_context *ctdb_db;
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "ctdb_client.h"
|
#include "ctdb_client.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
|
|
||||||
static void update_once(struct ctdb_context *ctdb, struct tevent_context *ev,
|
static void update_once(struct ctdb_context *ctdb, struct tevent_context *ev,
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "replace.h"
|
#include "replace.h"
|
||||||
#include "system/filesys.h"
|
#include "system/filesys.h"
|
||||||
|
#include "system/network.h"
|
||||||
#include "system/time.h"
|
#include "system/time.h"
|
||||||
|
|
||||||
#include <popt.h>
|
#include <popt.h>
|
||||||
@ -27,8 +28,11 @@
|
|||||||
|
|
||||||
#include "lib/util/dlinklist.h"
|
#include "lib/util/dlinklist.h"
|
||||||
|
|
||||||
#include "common/cmdline.h"
|
#include "ctdb_private.h"
|
||||||
|
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
|
#include "common/cmdline.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
static struct timeval tp1,tp2;
|
static struct timeval tp1,tp2;
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include "common/cmdline.h"
|
#include "common/cmdline.h"
|
||||||
#include "common/rb_tree.h"
|
#include "common/rb_tree.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#define ERR_TIMEOUT 20 /* timed out trying to reach node */
|
#define ERR_TIMEOUT 20 /* timed out trying to reach node */
|
||||||
#define ERR_NONODE 21 /* node does not exist */
|
#define ERR_NONODE 21 /* node does not exist */
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "ctdb_protocol.h"
|
#include "ctdb_protocol.h"
|
||||||
|
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/common.h"
|
||||||
|
|
||||||
#include <pcp/pmapi.h>
|
#include <pcp/pmapi.h>
|
||||||
#include <pcp/impl.h>
|
#include <pcp/impl.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user