mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-daemon: Rename struct ctdb_req_control to ctdb_req_control_old
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
acf858defb
commit
e1fed53e2a
@ -1073,7 +1073,7 @@ struct ctdb_client_control_state *ctdb_control_send(struct ctdb_context *ctdb,
|
|||||||
{
|
{
|
||||||
struct ctdb_client_control_state *state;
|
struct ctdb_client_control_state *state;
|
||||||
size_t len;
|
size_t len;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (errormsg) {
|
if (errormsg) {
|
||||||
@ -1095,9 +1095,9 @@ struct ctdb_client_control_state *ctdb_control_send(struct ctdb_context *ctdb,
|
|||||||
|
|
||||||
talloc_set_destructor(state, ctdb_client_control_destructor);
|
talloc_set_destructor(state, ctdb_client_control_destructor);
|
||||||
|
|
||||||
len = offsetof(struct ctdb_req_control, data) + data.dsize;
|
len = offsetof(struct ctdb_req_control_old, data) + data.dsize;
|
||||||
c = ctdbd_allocate_pkt(ctdb, state, CTDB_REQ_CONTROL,
|
c = ctdbd_allocate_pkt(ctdb, state, CTDB_REQ_CONTROL,
|
||||||
len, struct ctdb_req_control);
|
len, struct ctdb_req_control_old);
|
||||||
state->c = c;
|
state->c = c;
|
||||||
CTDB_NO_MEMORY_NULL(ctdb, c);
|
CTDB_NO_MEMORY_NULL(ctdb, c);
|
||||||
c->hdr.reqid = state->reqid;
|
c->hdr.reqid = state->reqid;
|
||||||
|
@ -359,7 +359,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length)
|
|||||||
if (queue->ctdb->tunable.verbose_memory_names != 0) {
|
if (queue->ctdb->tunable.verbose_memory_names != 0) {
|
||||||
switch (hdr->operation) {
|
switch (hdr->operation) {
|
||||||
case CTDB_REQ_CONTROL: {
|
case CTDB_REQ_CONTROL: {
|
||||||
struct ctdb_req_control *c = (struct ctdb_req_control *)hdr;
|
struct ctdb_req_control_old *c = (struct ctdb_req_control_old *)hdr;
|
||||||
talloc_set_name(pkt, "ctdb_queue_pkt: %s control opcode=%u srvid=%llu datalen=%u",
|
talloc_set_name(pkt, "ctdb_queue_pkt: %s control opcode=%u srvid=%llu datalen=%u",
|
||||||
queue->name, (unsigned)c->opcode, (unsigned long long)c->srvid, (unsigned)c->datalen);
|
queue->name, (unsigned)c->opcode, (unsigned long long)c->srvid, (unsigned)c->datalen);
|
||||||
break;
|
break;
|
||||||
|
@ -37,7 +37,7 @@ struct ctdb_client_control_state {
|
|||||||
TDB_DATA outdata;
|
TDB_DATA outdata;
|
||||||
enum control_state state;
|
enum control_state state;
|
||||||
char *errormsg;
|
char *errormsg;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
|
|
||||||
/* if we have a callback registered for the completion (or failure) of
|
/* if we have a callback registered for the completion (or failure) of
|
||||||
this control
|
this control
|
||||||
|
@ -583,7 +583,7 @@ int ctdb_add_revoke_deferred_call(struct ctdb_context *ctdb,
|
|||||||
int32_t ctdb_dump_memory(struct ctdb_context *ctdb, TDB_DATA *outdata);
|
int32_t ctdb_dump_memory(struct ctdb_context *ctdb, TDB_DATA *outdata);
|
||||||
|
|
||||||
void ctdb_request_control_reply(struct ctdb_context *ctdb,
|
void ctdb_request_control_reply(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata, int32_t status,
|
TDB_DATA *outdata, int32_t status,
|
||||||
const char *errormsg);
|
const char *errormsg);
|
||||||
|
|
||||||
@ -647,12 +647,12 @@ void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code);
|
|||||||
/* from server/ctdb_freeze.c */
|
/* from server/ctdb_freeze.c */
|
||||||
|
|
||||||
int32_t ctdb_control_db_freeze(struct ctdb_context *ctdb,
|
int32_t ctdb_control_db_freeze(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
uint32_t db_id, bool *async_reply);
|
uint32_t db_id, bool *async_reply);
|
||||||
int32_t ctdb_control_db_thaw(struct ctdb_context *ctdb, uint32_t db_id);
|
int32_t ctdb_control_db_thaw(struct ctdb_context *ctdb, uint32_t db_id);
|
||||||
|
|
||||||
int32_t ctdb_control_freeze(struct ctdb_context *ctdb,
|
int32_t ctdb_control_freeze(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c, bool *async_reply);
|
struct ctdb_req_control_old *c, bool *async_reply);
|
||||||
int32_t ctdb_control_thaw(struct ctdb_context *ctdb, uint32_t priority,
|
int32_t ctdb_control_thaw(struct ctdb_context *ctdb, uint32_t priority,
|
||||||
bool check_recmode);
|
bool check_recmode);
|
||||||
|
|
||||||
@ -789,7 +789,7 @@ int ctdb_process_deferred_attach(struct ctdb_context *ctdb);
|
|||||||
int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
|
int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
|
||||||
TDB_DATA *outdata, uint64_t tdb_flags,
|
TDB_DATA *outdata, uint64_t tdb_flags,
|
||||||
bool persistent, uint32_t client_id,
|
bool persistent, uint32_t client_id,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply);
|
bool *async_reply);
|
||||||
int32_t ctdb_control_db_detach(struct ctdb_context *ctdb, TDB_DATA indata,
|
int32_t ctdb_control_db_detach(struct ctdb_context *ctdb, TDB_DATA indata,
|
||||||
uint32_t client_id);
|
uint32_t client_id);
|
||||||
@ -832,14 +832,14 @@ bool ctdb_stopped_monitoring(struct ctdb_context *ctdb);
|
|||||||
void ctdb_persistent_finish_trans3_commits(struct ctdb_context *ctdb);
|
void ctdb_persistent_finish_trans3_commits(struct ctdb_context *ctdb);
|
||||||
|
|
||||||
int32_t ctdb_control_trans3_commit(struct ctdb_context *ctdb,
|
int32_t ctdb_control_trans3_commit(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA recdata, bool *async_reply);
|
TDB_DATA recdata, bool *async_reply);
|
||||||
|
|
||||||
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_old *c,
|
||||||
TDB_DATA recdata);
|
TDB_DATA recdata);
|
||||||
int32_t ctdb_control_cancel_persistent_update(struct ctdb_context *ctdb,
|
int32_t ctdb_control_cancel_persistent_update(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA recdata);
|
TDB_DATA recdata);
|
||||||
|
|
||||||
int32_t ctdb_control_get_db_seqnum(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_db_seqnum(struct ctdb_context *ctdb,
|
||||||
@ -866,7 +866,7 @@ int32_t ctdb_control_push_db(struct ctdb_context *ctdb, TDB_DATA indata);
|
|||||||
int ctdb_deferred_drop_all_ips(struct ctdb_context *ctdb);
|
int ctdb_deferred_drop_all_ips(struct ctdb_context *ctdb);
|
||||||
|
|
||||||
int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
|
int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata, bool *async_reply,
|
TDB_DATA indata, bool *async_reply,
|
||||||
const char **errormsg);
|
const char **errormsg);
|
||||||
|
|
||||||
@ -875,10 +875,10 @@ bool ctdb_recovery_lock(struct ctdb_context *ctdb);
|
|||||||
void ctdb_recovery_unlock(struct ctdb_context *ctdb);
|
void ctdb_recovery_unlock(struct ctdb_context *ctdb);
|
||||||
|
|
||||||
int32_t ctdb_control_end_recovery(struct ctdb_context *ctdb,
|
int32_t ctdb_control_end_recovery(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply);
|
bool *async_reply);
|
||||||
int32_t ctdb_control_start_recovery(struct ctdb_context *ctdb,
|
int32_t ctdb_control_start_recovery(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply);
|
bool *async_reply);
|
||||||
|
|
||||||
int32_t ctdb_control_try_delete_records(struct ctdb_context *ctdb,
|
int32_t ctdb_control_try_delete_records(struct ctdb_context *ctdb,
|
||||||
@ -940,21 +940,21 @@ int32_t ctdb_control_get_server_id_list(struct ctdb_context *ctdb,
|
|||||||
int ctdb_statistics_init(struct ctdb_context *ctdb);
|
int ctdb_statistics_init(struct ctdb_context *ctdb);
|
||||||
|
|
||||||
int32_t ctdb_control_get_stat_history(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_stat_history(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata);
|
TDB_DATA *outdata);
|
||||||
|
|
||||||
/* from ctdb_takeover.c */
|
/* from ctdb_takeover.c */
|
||||||
|
|
||||||
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_old *c,
|
||||||
TDB_DATA indata,
|
TDB_DATA indata,
|
||||||
bool *async_reply);
|
bool *async_reply);
|
||||||
int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
|
int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata,
|
TDB_DATA indata,
|
||||||
bool *async_reply);
|
bool *async_reply);
|
||||||
int32_t ctdb_control_ipreallocated(struct ctdb_context *ctdb,
|
int32_t ctdb_control_ipreallocated(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply);
|
bool *async_reply);
|
||||||
|
|
||||||
int ctdb_set_public_addresses(struct ctdb_context *ctdb, bool check_addresses);
|
int ctdb_set_public_addresses(struct ctdb_context *ctdb, bool check_addresses);
|
||||||
@ -977,17 +977,17 @@ void ctdb_takeover_client_destructor_hook(struct ctdb_client *client);
|
|||||||
void ctdb_release_all_ips(struct ctdb_context *ctdb);
|
void ctdb_release_all_ips(struct ctdb_context *ctdb);
|
||||||
|
|
||||||
int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata);
|
TDB_DATA *outdata);
|
||||||
int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata, TDB_DATA *outdata);
|
TDB_DATA indata, TDB_DATA *outdata);
|
||||||
|
|
||||||
int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata);
|
TDB_DATA *outdata);
|
||||||
int32_t ctdb_control_set_iface_link(struct ctdb_context *ctdb,
|
int32_t ctdb_control_set_iface_link(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata);
|
TDB_DATA indata);
|
||||||
|
|
||||||
int32_t ctdb_control_kill_tcp(struct ctdb_context *ctdb, TDB_DATA indata);
|
int32_t ctdb_control_kill_tcp(struct ctdb_context *ctdb, TDB_DATA indata);
|
||||||
@ -1004,7 +1004,7 @@ int32_t ctdb_control_send_gratious_arp(struct ctdb_context *ctdb,
|
|||||||
int32_t ctdb_control_add_public_address(struct ctdb_context *ctdb,
|
int32_t ctdb_control_add_public_address(struct ctdb_context *ctdb,
|
||||||
TDB_DATA indata);
|
TDB_DATA indata);
|
||||||
int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb,
|
int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA recdata, bool *async_reply);
|
TDB_DATA recdata, bool *async_reply);
|
||||||
|
|
||||||
int verify_remote_ip_allocation(struct ctdb_context *ctdb,
|
int verify_remote_ip_allocation(struct ctdb_context *ctdb,
|
||||||
@ -1015,7 +1015,7 @@ int update_ip_assignment_tree(struct ctdb_context *ctdb,
|
|||||||
void clear_ip_assignment_tree(struct ctdb_context *ctdb);
|
void clear_ip_assignment_tree(struct ctdb_context *ctdb);
|
||||||
|
|
||||||
int32_t ctdb_control_reload_public_ips(struct ctdb_context *ctdb,
|
int32_t ctdb_control_reload_public_ips(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply);
|
bool *async_reply);
|
||||||
|
|
||||||
/* from ctdb_traverse.c */
|
/* from ctdb_traverse.c */
|
||||||
@ -1049,7 +1049,7 @@ int32_t ctdb_control_list_tunables(struct ctdb_context *ctdb,
|
|||||||
/* from ctdb_update_record.c */
|
/* from ctdb_update_record.c */
|
||||||
|
|
||||||
int32_t ctdb_control_update_record(struct ctdb_context *ctdb,
|
int32_t ctdb_control_update_record(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA recdata, bool *async_reply);
|
TDB_DATA recdata, bool *async_reply);
|
||||||
|
|
||||||
/* from ctdb_uptime.c */
|
/* from ctdb_uptime.c */
|
||||||
@ -1093,7 +1093,7 @@ int ctdb_event_script(struct ctdb_context *ctdb,
|
|||||||
enum ctdb_event call);
|
enum ctdb_event call);
|
||||||
|
|
||||||
int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb,
|
int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA data, bool *async_reply);
|
TDB_DATA data, bool *async_reply);
|
||||||
|
|
||||||
int32_t ctdb_control_enable_script(struct ctdb_context *ctdb, TDB_DATA indata);
|
int32_t ctdb_control_enable_script(struct ctdb_context *ctdb, TDB_DATA indata);
|
||||||
|
@ -480,7 +480,7 @@ struct ctdb_req_message_old {
|
|||||||
uint8_t data[1];
|
uint8_t data[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ctdb_req_control {
|
struct ctdb_req_control_old {
|
||||||
struct ctdb_req_header hdr;
|
struct ctdb_req_header hdr;
|
||||||
uint32_t opcode;
|
uint32_t opcode;
|
||||||
uint32_t pad;
|
uint32_t pad;
|
||||||
|
@ -91,7 +91,7 @@ static int32_t control_not_implemented(const char *unsupported,
|
|||||||
process a control request
|
process a control request
|
||||||
*/
|
*/
|
||||||
static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
|
static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata,
|
TDB_DATA indata,
|
||||||
TDB_DATA *outdata, uint32_t srcnode,
|
TDB_DATA *outdata, uint32_t srcnode,
|
||||||
const char **errormsg,
|
const char **errormsg,
|
||||||
@ -724,7 +724,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
|
|||||||
/*
|
/*
|
||||||
send a reply for a ctdb control
|
send a reply for a ctdb control
|
||||||
*/
|
*/
|
||||||
void ctdb_request_control_reply(struct ctdb_context *ctdb, struct ctdb_req_control *c,
|
void ctdb_request_control_reply(struct ctdb_context *ctdb, struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata, int32_t status, const char *errormsg)
|
TDB_DATA *outdata, int32_t status, const char *errormsg)
|
||||||
{
|
{
|
||||||
struct ctdb_reply_control *r;
|
struct ctdb_reply_control *r;
|
||||||
@ -767,7 +767,7 @@ void ctdb_request_control_reply(struct ctdb_context *ctdb, struct ctdb_req_contr
|
|||||||
*/
|
*/
|
||||||
void ctdb_request_control(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
|
void ctdb_request_control(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
|
||||||
{
|
{
|
||||||
struct ctdb_req_control *c = (struct ctdb_req_control *)hdr;
|
struct ctdb_req_control_old *c = (struct ctdb_req_control_old *)hdr;
|
||||||
TDB_DATA data, *outdata;
|
TDB_DATA data, *outdata;
|
||||||
int32_t status;
|
int32_t status;
|
||||||
bool async_reply = false;
|
bool async_reply = false;
|
||||||
@ -860,7 +860,7 @@ int ctdb_daemon_send_control(struct ctdb_context *ctdb, uint32_t destnode,
|
|||||||
ctdb_control_callback_fn_t callback,
|
ctdb_control_callback_fn_t callback,
|
||||||
void *private_data)
|
void *private_data)
|
||||||
{
|
{
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
struct ctdb_control_state *state;
|
struct ctdb_control_state *state;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
@ -901,9 +901,9 @@ int ctdb_daemon_send_control(struct ctdb_context *ctdb, uint32_t destnode,
|
|||||||
|
|
||||||
talloc_set_destructor(state, ctdb_control_destructor);
|
talloc_set_destructor(state, ctdb_control_destructor);
|
||||||
|
|
||||||
len = offsetof(struct ctdb_req_control, data) + data.dsize;
|
len = offsetof(struct ctdb_req_control_old, data) + data.dsize;
|
||||||
c = ctdb_transport_allocate(ctdb, state, CTDB_REQ_CONTROL, len,
|
c = ctdb_transport_allocate(ctdb, state, CTDB_REQ_CONTROL, len,
|
||||||
struct ctdb_req_control);
|
struct ctdb_req_control_old);
|
||||||
CTDB_NO_MEMORY(ctdb, c);
|
CTDB_NO_MEMORY(ctdb, c);
|
||||||
talloc_set_name_const(c, "ctdb_req_control packet");
|
talloc_set_name_const(c, "ctdb_req_control packet");
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
|
|||||||
|
|
||||||
|
|
||||||
static void daemon_request_control_from_client(struct ctdb_client *client,
|
static void daemon_request_control_from_client(struct ctdb_client *client,
|
||||||
struct ctdb_req_control *c);
|
struct ctdb_req_control_old *c);
|
||||||
|
|
||||||
/* data contains a packet from the client */
|
/* data contains a packet from the client */
|
||||||
static void daemon_incoming_packet(void *p, struct ctdb_req_header *hdr)
|
static void daemon_incoming_packet(void *p, struct ctdb_req_header *hdr)
|
||||||
@ -850,7 +850,7 @@ static void daemon_incoming_packet(void *p, struct ctdb_req_header *hdr)
|
|||||||
|
|
||||||
case CTDB_REQ_CONTROL:
|
case CTDB_REQ_CONTROL:
|
||||||
CTDB_INCREMENT_STAT(ctdb, client.req_control);
|
CTDB_INCREMENT_STAT(ctdb, client.req_control);
|
||||||
daemon_request_control_from_client(client, (struct ctdb_req_control *)hdr);
|
daemon_request_control_from_client(client, (struct ctdb_req_control_old *)hdr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1424,7 +1424,7 @@ struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
|
|||||||
struct daemon_control_state {
|
struct daemon_control_state {
|
||||||
struct daemon_control_state *next, *prev;
|
struct daemon_control_state *next, *prev;
|
||||||
struct ctdb_client *client;
|
struct ctdb_client *client;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
uint32_t reqid;
|
uint32_t reqid;
|
||||||
struct ctdb_node *node;
|
struct ctdb_node *node;
|
||||||
};
|
};
|
||||||
@ -1498,7 +1498,7 @@ static int daemon_control_destructor(struct daemon_control_state *state)
|
|||||||
from a local client over the unix domain socket
|
from a local client over the unix domain socket
|
||||||
*/
|
*/
|
||||||
static void daemon_request_control_from_client(struct ctdb_client *client,
|
static void daemon_request_control_from_client(struct ctdb_client *client,
|
||||||
struct ctdb_req_control *c)
|
struct ctdb_req_control_old *c)
|
||||||
{
|
{
|
||||||
TDB_DATA data;
|
TDB_DATA data;
|
||||||
int res;
|
int res;
|
||||||
|
@ -215,8 +215,8 @@ static void ctdb_start_db_freeze(struct ctdb_db_context *ctdb_db)
|
|||||||
static int ctdb_db_freeze_waiter_destructor(struct ctdb_db_freeze_waiter *w)
|
static int ctdb_db_freeze_waiter_destructor(struct ctdb_db_freeze_waiter *w)
|
||||||
{
|
{
|
||||||
/* 'c' pointer is talloc_memdup(), so cannot use talloc_get_type */
|
/* 'c' pointer is talloc_memdup(), so cannot use talloc_get_type */
|
||||||
struct ctdb_req_control *c =
|
struct ctdb_req_control_old *c =
|
||||||
(struct ctdb_req_control *)w->private_data;
|
(struct ctdb_req_control_old *)w->private_data;
|
||||||
|
|
||||||
ctdb_request_control_reply(w->ctdb, c, NULL, w->status, NULL);
|
ctdb_request_control_reply(w->ctdb, c, NULL, w->status, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
@ -226,7 +226,7 @@ static int ctdb_db_freeze_waiter_destructor(struct ctdb_db_freeze_waiter *w)
|
|||||||
* freeze a database
|
* freeze a database
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_db_freeze(struct ctdb_context *ctdb,
|
int32_t ctdb_control_db_freeze(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
uint32_t db_id,
|
uint32_t db_id,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
@ -288,7 +288,7 @@ int32_t ctdb_control_db_thaw(struct ctdb_context *ctdb, uint32_t db_id)
|
|||||||
struct ctdb_freeze_waiter {
|
struct ctdb_freeze_waiter {
|
||||||
struct ctdb_freeze_waiter *next, *prev;
|
struct ctdb_freeze_waiter *next, *prev;
|
||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
int32_t status;
|
int32_t status;
|
||||||
};
|
};
|
||||||
@ -546,7 +546,7 @@ static int ctdb_freeze_waiter_destructor(struct ctdb_freeze_waiter *w)
|
|||||||
/*
|
/*
|
||||||
freeze the databases
|
freeze the databases
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_freeze(struct ctdb_context *ctdb, struct ctdb_req_control *c, bool *async_reply)
|
int32_t ctdb_control_freeze(struct ctdb_context *ctdb, struct ctdb_req_control_old *c, bool *async_reply)
|
||||||
{
|
{
|
||||||
struct ctdb_freeze_waiter *w;
|
struct ctdb_freeze_waiter *w;
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
|
@ -1036,7 +1036,7 @@ again:
|
|||||||
struct ctdb_deferred_attach_context {
|
struct ctdb_deferred_attach_context {
|
||||||
struct ctdb_deferred_attach_context *next, *prev;
|
struct ctdb_deferred_attach_context *next, *prev;
|
||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1093,7 +1093,7 @@ int ctdb_process_deferred_attach(struct ctdb_context *ctdb)
|
|||||||
int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
|
int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
|
||||||
TDB_DATA *outdata, uint64_t tdb_flags,
|
TDB_DATA *outdata, uint64_t tdb_flags,
|
||||||
bool persistent, uint32_t client_id,
|
bool persistent, uint32_t client_id,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
const char *db_name = (const char *)indata.dptr;
|
const char *db_name = (const char *)indata.dptr;
|
||||||
|
@ -41,7 +41,7 @@ struct ctdb_persistent_state {
|
|||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
struct ctdb_db_context *ctdb_db; /* used by trans3_commit */
|
struct ctdb_db_context *ctdb_db; /* used by trans3_commit */
|
||||||
struct ctdb_client *client; /* used by trans3_commit */
|
struct ctdb_client *client; /* used by trans3_commit */
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
const char *errormsg;
|
const char *errormsg;
|
||||||
uint32_t num_pending;
|
uint32_t num_pending;
|
||||||
int32_t status;
|
int32_t status;
|
||||||
@ -173,7 +173,7 @@ static int ctdb_persistent_state_destructor(struct ctdb_persistent_state *state)
|
|||||||
* This is used to roll out a transaction to all nodes.
|
* This is used to roll out a transaction to all nodes.
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_trans3_commit(struct ctdb_context *ctdb,
|
int32_t ctdb_control_trans3_commit(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA recdata, bool *async_reply)
|
TDB_DATA recdata, bool *async_reply)
|
||||||
{
|
{
|
||||||
struct ctdb_client *client;
|
struct ctdb_client *client;
|
||||||
@ -287,7 +287,7 @@ int32_t ctdb_control_trans3_commit(struct ctdb_context *ctdb,
|
|||||||
for now we ignore the recdata that the client has passed to us.
|
for now we ignore the recdata that the client has passed to us.
|
||||||
*/
|
*/
|
||||||
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_old *c,
|
||||||
TDB_DATA recdata)
|
TDB_DATA recdata)
|
||||||
{
|
{
|
||||||
struct ctdb_client *client = reqid_find(ctdb->idr, c->client_id, struct ctdb_client);
|
struct ctdb_client *client = reqid_find(ctdb->idr, c->client_id, struct ctdb_client);
|
||||||
@ -308,7 +308,7 @@ int32_t ctdb_control_start_persistent_update(struct ctdb_context *ctdb,
|
|||||||
called to tell ctdbd that it is no longer doing a persistent update
|
called to tell ctdbd that it is no longer doing a persistent update
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_cancel_persistent_update(struct ctdb_context *ctdb,
|
int32_t ctdb_control_cancel_persistent_update(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA recdata)
|
TDB_DATA recdata)
|
||||||
{
|
{
|
||||||
struct ctdb_client *client = reqid_find(ctdb->idr, c->client_id, struct ctdb_client);
|
struct ctdb_client *client = reqid_find(ctdb->idr, c->client_id, struct ctdb_client);
|
||||||
|
@ -408,7 +408,7 @@ failed:
|
|||||||
|
|
||||||
struct ctdb_set_recmode_state {
|
struct ctdb_set_recmode_state {
|
||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
uint32_t recmode;
|
uint32_t recmode;
|
||||||
int fd[2];
|
int fd[2];
|
||||||
struct tevent_timer *te;
|
struct tevent_timer *te;
|
||||||
@ -539,7 +539,7 @@ int ctdb_deferred_drop_all_ips(struct ctdb_context *ctdb)
|
|||||||
set the recovery mode
|
set the recovery mode
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
|
int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata, bool *async_reply,
|
TDB_DATA indata, bool *async_reply,
|
||||||
const char **errormsg)
|
const char **errormsg)
|
||||||
{
|
{
|
||||||
@ -858,7 +858,7 @@ static int delete_tdb_record(struct ctdb_context *ctdb, struct ctdb_db_context *
|
|||||||
|
|
||||||
|
|
||||||
struct recovery_callback_state {
|
struct recovery_callback_state {
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -893,7 +893,7 @@ static void ctdb_end_recovery_callback(struct ctdb_context *ctdb, int status, vo
|
|||||||
recovery has finished
|
recovery has finished
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_end_recovery(struct ctdb_context *ctdb,
|
int32_t ctdb_control_end_recovery(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -948,7 +948,7 @@ static void ctdb_start_recovery_callback(struct ctdb_context *ctdb, int status,
|
|||||||
run the startrecovery eventscript
|
run the startrecovery eventscript
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_start_recovery(struct ctdb_context *ctdb,
|
int32_t ctdb_control_start_recovery(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -67,7 +67,7 @@ int ctdb_statistics_init(struct ctdb_context *ctdb)
|
|||||||
|
|
||||||
|
|
||||||
int32_t ctdb_control_get_stat_history(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_stat_history(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata)
|
TDB_DATA *outdata)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
@ -404,13 +404,13 @@ static int32_t ctdb_announce_vnn_iface(struct ctdb_context *ctdb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct takeover_callback_state {
|
struct takeover_callback_state {
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
ctdb_sock_addr *addr;
|
ctdb_sock_addr *addr;
|
||||||
struct ctdb_vnn *vnn;
|
struct ctdb_vnn *vnn;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ctdb_do_takeip_state {
|
struct ctdb_do_takeip_state {
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
struct ctdb_vnn *vnn;
|
struct ctdb_vnn *vnn;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -475,7 +475,7 @@ static int ctdb_takeip_destructor(struct ctdb_do_takeip_state *state)
|
|||||||
take over an ip address
|
take over an ip address
|
||||||
*/
|
*/
|
||||||
static int32_t ctdb_do_takeip(struct ctdb_context *ctdb,
|
static int32_t ctdb_do_takeip(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
struct ctdb_vnn *vnn)
|
struct ctdb_vnn *vnn)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -534,7 +534,7 @@ static int32_t ctdb_do_takeip(struct ctdb_context *ctdb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct ctdb_do_updateip_state {
|
struct ctdb_do_updateip_state {
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
struct ctdb_iface *old;
|
struct ctdb_iface *old;
|
||||||
struct ctdb_vnn *vnn;
|
struct ctdb_vnn *vnn;
|
||||||
};
|
};
|
||||||
@ -598,7 +598,7 @@ static int ctdb_updateip_destructor(struct ctdb_do_updateip_state *state)
|
|||||||
update (move) an ip address
|
update (move) an ip address
|
||||||
*/
|
*/
|
||||||
static int32_t ctdb_do_updateip(struct ctdb_context *ctdb,
|
static int32_t ctdb_do_updateip(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
struct ctdb_vnn *vnn)
|
struct ctdb_vnn *vnn)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -694,7 +694,7 @@ static struct ctdb_vnn *find_public_ip_vnn(struct ctdb_context *ctdb, ctdb_sock_
|
|||||||
take over an ip address
|
take over an ip address
|
||||||
*/
|
*/
|
||||||
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_old *c,
|
||||||
TDB_DATA indata,
|
TDB_DATA indata,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
@ -926,7 +926,7 @@ static int ctdb_releaseip_destructor(struct takeover_callback_state *state)
|
|||||||
release an ip address
|
release an ip address
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
|
int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata,
|
TDB_DATA indata,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
@ -3197,7 +3197,7 @@ void ctdb_release_all_ips(struct ctdb_context *ctdb)
|
|||||||
get list of public IPs
|
get list of public IPs
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c, TDB_DATA *outdata)
|
struct ctdb_req_control_old *c, TDB_DATA *outdata)
|
||||||
{
|
{
|
||||||
int i, num, len;
|
int i, num, len;
|
||||||
struct ctdb_all_public_ips *ips;
|
struct ctdb_all_public_ips *ips;
|
||||||
@ -3240,7 +3240,7 @@ int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
|
|||||||
|
|
||||||
|
|
||||||
int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata,
|
TDB_DATA indata,
|
||||||
TDB_DATA *outdata)
|
TDB_DATA *outdata)
|
||||||
{
|
{
|
||||||
@ -3309,7 +3309,7 @@ int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata)
|
TDB_DATA *outdata)
|
||||||
{
|
{
|
||||||
int i, num, len;
|
int i, num, len;
|
||||||
@ -3345,7 +3345,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t ctdb_control_set_iface_link(struct ctdb_context *ctdb,
|
int32_t ctdb_control_set_iface_link(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata)
|
TDB_DATA indata)
|
||||||
{
|
{
|
||||||
struct ctdb_control_iface_info *info;
|
struct ctdb_control_iface_info *info;
|
||||||
@ -4058,7 +4058,7 @@ int32_t ctdb_control_add_public_address(struct ctdb_context *ctdb, TDB_DATA inda
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct delete_ip_callback_state {
|
struct delete_ip_callback_state {
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4078,7 +4078,7 @@ static void delete_ip_callback(struct ctdb_context *ctdb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb,
|
int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata, bool *async_reply)
|
TDB_DATA indata, bool *async_reply)
|
||||||
{
|
{
|
||||||
struct ctdb_control_ip_iface *pub = (struct ctdb_control_ip_iface *)indata.dptr;
|
struct ctdb_control_ip_iface *pub = (struct ctdb_control_ip_iface *)indata.dptr;
|
||||||
@ -4167,7 +4167,7 @@ int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb,
|
|||||||
|
|
||||||
|
|
||||||
struct ipreallocated_callback_state {
|
struct ipreallocated_callback_state {
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void ctdb_ipreallocated_callback(struct ctdb_context *ctdb,
|
static void ctdb_ipreallocated_callback(struct ctdb_context *ctdb,
|
||||||
@ -4191,7 +4191,7 @@ static void ctdb_ipreallocated_callback(struct ctdb_context *ctdb,
|
|||||||
|
|
||||||
/* A control to run the ipreallocated event */
|
/* A control to run the ipreallocated event */
|
||||||
int32_t ctdb_control_ipreallocated(struct ctdb_context *ctdb,
|
int32_t ctdb_control_ipreallocated(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -4299,7 +4299,7 @@ void clear_ip_assignment_tree(struct ctdb_context *ctdb)
|
|||||||
|
|
||||||
struct ctdb_reloadips_handle {
|
struct ctdb_reloadips_handle {
|
||||||
struct ctdb_context *ctdb;
|
struct ctdb_context *ctdb;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
int status;
|
int status;
|
||||||
int fd[2];
|
int fd[2];
|
||||||
pid_t child;
|
pid_t child;
|
||||||
@ -4525,7 +4525,7 @@ failed:
|
|||||||
and drop any addresses we should nnot longer host, and add new addresses
|
and drop any addresses we should nnot longer host, and add new addresses
|
||||||
that we are now able to host
|
that we are now able to host
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_reload_public_ips(struct ctdb_context *ctdb, struct ctdb_req_control *c, bool *async_reply)
|
int32_t ctdb_control_reload_public_ips(struct ctdb_context *ctdb, struct ctdb_req_control_old *c, bool *async_reply)
|
||||||
{
|
{
|
||||||
struct ctdb_reloadips_handle *h;
|
struct ctdb_reloadips_handle *h;
|
||||||
pid_t parent = getpid();
|
pid_t parent = getpid();
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
struct ctdb_persistent_write_state {
|
struct ctdb_persistent_write_state {
|
||||||
struct ctdb_db_context *ctdb_db;
|
struct ctdb_db_context *ctdb_db;
|
||||||
struct ctdb_marshall_buffer *m;
|
struct ctdb_marshall_buffer *m;
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ static struct childwrite_handle *ctdb_childwrite(
|
|||||||
current record
|
current record
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_control_update_record(struct ctdb_context *ctdb,
|
int32_t ctdb_control_update_record(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c, TDB_DATA recdata,
|
struct ctdb_req_control_old *c, TDB_DATA recdata,
|
||||||
bool *async_reply)
|
bool *async_reply)
|
||||||
{
|
{
|
||||||
struct ctdb_db_context *ctdb_db;
|
struct ctdb_db_context *ctdb_db;
|
||||||
|
@ -928,7 +928,7 @@ int ctdb_event_script(struct ctdb_context *ctdb, enum ctdb_event call)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct eventscript_callback_state {
|
struct eventscript_callback_state {
|
||||||
struct ctdb_req_control *c;
|
struct ctdb_req_control_old *c;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -985,7 +985,7 @@ static const char *get_call(const char *p, enum ctdb_event *call)
|
|||||||
A control to force running of the eventscripts from the ctdb client tool
|
A control to force running of the eventscripts from the ctdb client tool
|
||||||
*/
|
*/
|
||||||
int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb,
|
int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA indata, bool *async_reply)
|
TDB_DATA indata, bool *async_reply)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -540,7 +540,7 @@ ctdb_ctrl_getpnn_stub(struct ctdb_context *ctdb, struct timeval timeout,
|
|||||||
|
|
||||||
/* From ctdb_takeover.c */
|
/* From ctdb_takeover.c */
|
||||||
int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
|
int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
|
||||||
struct ctdb_req_control *c,
|
struct ctdb_req_control_old *c,
|
||||||
TDB_DATA *outdata)
|
TDB_DATA *outdata)
|
||||||
{
|
{
|
||||||
int i, num, len;
|
int i, num, len;
|
||||||
|
@ -640,7 +640,7 @@ static int ctdbd_control(struct ctdbd_connection *conn,
|
|||||||
TALLOC_CTX *mem_ctx, TDB_DATA *outdata,
|
TALLOC_CTX *mem_ctx, TDB_DATA *outdata,
|
||||||
int *cstatus)
|
int *cstatus)
|
||||||
{
|
{
|
||||||
struct ctdb_req_control req;
|
struct ctdb_req_control_old req;
|
||||||
struct ctdb_req_header *hdr;
|
struct ctdb_req_header *hdr;
|
||||||
struct ctdb_reply_control *reply = NULL;
|
struct ctdb_reply_control *reply = NULL;
|
||||||
struct iovec iov[2];
|
struct iovec iov[2];
|
||||||
@ -648,7 +648,7 @@ static int ctdbd_control(struct ctdbd_connection *conn,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ZERO_STRUCT(req);
|
ZERO_STRUCT(req);
|
||||||
req.hdr.length = offsetof(struct ctdb_req_control, data) + data.dsize;
|
req.hdr.length = offsetof(struct ctdb_req_control_old, data) + data.dsize;
|
||||||
req.hdr.ctdb_magic = CTDB_MAGIC;
|
req.hdr.ctdb_magic = CTDB_MAGIC;
|
||||||
req.hdr.ctdb_version = CTDB_PROTOCOL;
|
req.hdr.ctdb_version = CTDB_PROTOCOL;
|
||||||
req.hdr.operation = CTDB_REQ_CONTROL;
|
req.hdr.operation = CTDB_REQ_CONTROL;
|
||||||
@ -663,7 +663,7 @@ static int ctdbd_control(struct ctdbd_connection *conn,
|
|||||||
ctdb_packet_dump(&req.hdr);
|
ctdb_packet_dump(&req.hdr);
|
||||||
|
|
||||||
iov[0].iov_base = &req;
|
iov[0].iov_base = &req;
|
||||||
iov[0].iov_len = offsetof(struct ctdb_req_control, data);
|
iov[0].iov_len = offsetof(struct ctdb_req_control_old, data);
|
||||||
iov[1].iov_base = data.dptr;
|
iov[1].iov_base = data.dptr;
|
||||||
iov[1].iov_len = data.dsize;
|
iov[1].iov_len = data.dsize;
|
||||||
|
|
||||||
@ -742,7 +742,7 @@ bool ctdb_processes_exist(struct ctdbd_connection *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<num_pids; i++) {
|
for (i=0; i<num_pids; i++) {
|
||||||
struct ctdb_req_control req;
|
struct ctdb_req_control_old req;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
struct iovec iov[2];
|
struct iovec iov[2];
|
||||||
ssize_t nwritten;
|
ssize_t nwritten;
|
||||||
@ -762,7 +762,7 @@ bool ctdb_processes_exist(struct ctdbd_connection *conn,
|
|||||||
(int)pids[i].vnn, (int)pid,
|
(int)pids[i].vnn, (int)pid,
|
||||||
(int)reqids[i]));
|
(int)reqids[i]));
|
||||||
|
|
||||||
req.hdr.length = offsetof(struct ctdb_req_control, data);
|
req.hdr.length = offsetof(struct ctdb_req_control_old, data);
|
||||||
req.hdr.length += sizeof(pid);
|
req.hdr.length += sizeof(pid);
|
||||||
req.hdr.ctdb_magic = CTDB_MAGIC;
|
req.hdr.ctdb_magic = CTDB_MAGIC;
|
||||||
req.hdr.ctdb_version = CTDB_PROTOCOL;
|
req.hdr.ctdb_version = CTDB_PROTOCOL;
|
||||||
@ -778,7 +778,7 @@ bool ctdb_processes_exist(struct ctdbd_connection *conn,
|
|||||||
ctdb_packet_dump(&req.hdr);
|
ctdb_packet_dump(&req.hdr);
|
||||||
|
|
||||||
iov[0].iov_base = &req;
|
iov[0].iov_base = &req;
|
||||||
iov[0].iov_len = offsetof(struct ctdb_req_control, data);
|
iov[0].iov_len = offsetof(struct ctdb_req_control_old, data);
|
||||||
iov[1].iov_base = &pid;
|
iov[1].iov_base = &pid;
|
||||||
iov[1].iov_len = sizeof(pid);
|
iov[1].iov_len = sizeof(pid);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user