ctdb-daemon: Drop unused old client recmaster functions
authorMartin Schwenke <martin@meltin.net>
Tue, 5 May 2020 13:52:05 +0000 (23:52 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 17 Jan 2022 10:21:33 +0000 (10:21 +0000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/include/ctdb_client.h
ctdb/server/ctdb_client.c

index b89c4e49b2f815694b841a6c5e662ab445d30662..b993620804895fb0b04ad49d96fbce1cb0d65fc0 100644 (file)
@@ -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);
index 5d1a30d03dadcdd77e795ff4d698701c06ca2a1f..c9edb1d554cc04ec442038d76ba584f0d8c627c2 100644 (file)
@@ -965,70 +965,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
  */