diff options
author | Martin Schwenke <martin@meltin.net> | 2020-05-05 23:52:05 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2022-01-17 10:21:33 +0000 |
commit | 16efbca0036ee444aecfa0a992ff733bb182b2c7 (patch) | |
tree | acccb12ee2ab0286d9dd2a9ecc8c056586360407 /ctdb | |
parent | c68267b2a60559755835c4d56b5ba7c766155489 (diff) | |
download | samba-16efbca0036ee444aecfa0a992ff733bb182b2c7.tar.gz |
ctdb-daemon: Drop unused old client recmaster functions
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/include/ctdb_client.h | 22 | ||||
-rw-r--r-- | ctdb/server/ctdb_client.c | 64 |
2 files changed, 0 insertions, 86 deletions
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h index b89c4e49b2f..b9936208048 100644 --- a/ctdb/include/ctdb_client.h +++ b/ctdb/include/ctdb_client.h @@ -143,28 +143,6 @@ int ctdb_ctrl_getrecmode(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, int ctdb_ctrl_setrecmode(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t recmode); -/* - get the recovery master of a remote node - */ -struct ctdb_client_control_state *ctdb_ctrl_getrecmaster_send( - struct ctdb_context *ctdb, - TALLOC_CTX *mem_ctx, - struct timeval timeout, - uint32_t destnode); -int ctdb_ctrl_getrecmaster_recv(struct ctdb_context *ctdb, - TALLOC_CTX *mem_ctx, - struct ctdb_client_control_state *state, - uint32_t *recmaster); -int ctdb_ctrl_getrecmaster(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, - struct timeval timeout, uint32_t destnode, - uint32_t *recmaster); - -/* - set the recovery master of a remote node - */ -int ctdb_ctrl_setrecmaster(struct ctdb_context *ctdb, struct timeval timeout, - uint32_t destnode, uint32_t recmaster); - int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, TALLOC_CTX *mem_ctx, struct ctdb_node_map_old **nodemap); diff --git a/ctdb/server/ctdb_client.c b/ctdb/server/ctdb_client.c index 5d1a30d03da..c9edb1d554c 100644 --- a/ctdb/server/ctdb_client.c +++ b/ctdb/server/ctdb_client.c @@ -966,70 +966,6 @@ int ctdb_ctrl_setrecmode(struct ctdb_context *ctdb, struct timeval timeout, uint /* - get the recovery master of a remote node - */ -struct ctdb_client_control_state * -ctdb_ctrl_getrecmaster_send(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, - struct timeval timeout, uint32_t destnode) -{ - return ctdb_control_send(ctdb, destnode, 0, - CTDB_CONTROL_GET_RECMASTER, 0, tdb_null, - mem_ctx, &timeout, NULL); -} - -int ctdb_ctrl_getrecmaster_recv(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct ctdb_client_control_state *state, uint32_t *recmaster) -{ - int ret; - int32_t res; - - ret = ctdb_control_recv(ctdb, state, mem_ctx, NULL, &res, NULL); - if (ret != 0) { - DEBUG(DEBUG_ERR,(__location__ " ctdb_ctrl_getrecmaster_recv failed\n")); - return -1; - } - - if (recmaster) { - *recmaster = (uint32_t)res; - } - - return 0; -} - -int ctdb_ctrl_getrecmaster(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct timeval timeout, uint32_t destnode, uint32_t *recmaster) -{ - struct ctdb_client_control_state *state; - - state = ctdb_ctrl_getrecmaster_send(ctdb, mem_ctx, timeout, destnode); - return ctdb_ctrl_getrecmaster_recv(ctdb, mem_ctx, state, recmaster); -} - - -/* - set the recovery master of a remote node - */ -int ctdb_ctrl_setrecmaster(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t recmaster) -{ - int ret; - TDB_DATA data; - int32_t res; - - ZERO_STRUCT(data); - data.dsize = sizeof(uint32_t); - data.dptr = (unsigned char *)&recmaster; - - ret = ctdb_control(ctdb, destnode, 0, - CTDB_CONTROL_SET_RECMASTER, 0, data, - NULL, NULL, &res, &timeout, NULL); - if (ret != 0 || res != 0) { - DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setrecmaster failed\n")); - return -1; - } - - return 0; -} - - -/* get a list of nodes (vnn and flags ) from a remote node */ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb, |