summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2020-02-25 06:20:32 +1100
committerMartin Schwenke <martins@samba.org>2020-03-23 23:45:38 +0000
commit052f1bdb9cf78f53f584edd32f81ae8e01e8e86e (patch)
tree2528cc25054494aae3e1f56deb81321f091abf6c /ctdb
parent3a66d181b6f6199fca362fcb0aa06513645b589d (diff)
downloadsamba-052f1bdb9cf78f53f584edd32f81ae8e01e8e86e.tar.gz
ctdb-daemon: Remove more unused old client database functions
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14294 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.h12
-rw-r--r--ctdb/server/ctdb_client.c105
2 files changed, 0 insertions, 117 deletions
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index d1dce1e68d8..198a8a38dbb 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -165,10 +165,6 @@ int ctdb_ctrl_getrecmaster(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx,
int ctdb_ctrl_setrecmaster(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, uint32_t recmaster);
-int ctdb_ctrl_getdbmap(struct ctdb_context *ctdb, struct timeval timeout,
- uint32_t destnode, TALLOC_CTX *mem_ctx,
- struct ctdb_dbid_map_old **dbmap);
-
int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, TALLOC_CTX *mem_ctx,
struct ctdb_node_map_old **nodemap);
@@ -176,14 +172,6 @@ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb, struct timeval timeout,
int ctdb_ctrl_get_runstate(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, uint32_t *runstate);
-int ctdb_ctrl_getdbname(struct ctdb_context *ctdb, struct timeval timeout,
- uint32_t destnode, uint32_t dbid,
- TALLOC_CTX *mem_ctx, const char **name);
-
-int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout,
- uint32_t destnode, TALLOC_CTX *mem_ctx,
- const char *name, uint8_t db_flags, uint32_t *db_id);
-
int ctdb_ctrl_get_debuglevel(struct ctdb_context *ctdb, uint32_t destnode,
int32_t *level);
diff --git a/ctdb/server/ctdb_client.c b/ctdb/server/ctdb_client.c
index 5d62e3c2c1b..453e7b28477 100644
--- a/ctdb/server/ctdb_client.c
+++ b/ctdb/server/ctdb_client.c
@@ -1030,30 +1030,6 @@ int ctdb_ctrl_setrecmaster(struct ctdb_context *ctdb, struct timeval timeout, ui
/*
- get a list of databases off a remote node
- */
-int ctdb_ctrl_getdbmap(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode,
- TALLOC_CTX *mem_ctx, struct ctdb_dbid_map_old **dbmap)
-{
- int ret;
- TDB_DATA outdata;
- int32_t res;
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_GET_DBMAP, 0, tdb_null,
- mem_ctx, &outdata, &res, &timeout, NULL);
- if (ret != 0 || res != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getdbmap failed ret:%d res:%d\n", ret, res));
- return -1;
- }
-
- *dbmap = (struct ctdb_dbid_map_old *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
- talloc_free(outdata.dptr);
-
- return 0;
-}
-
-/*
get a list of nodes (vnn and flags ) from a remote node
*/
int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
@@ -1108,87 +1084,6 @@ int ctdb_ctrl_get_runstate(struct ctdb_context *ctdb,
}
/*
- find the name of a db
- */
-int ctdb_ctrl_getdbname(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t dbid, TALLOC_CTX *mem_ctx,
- const char **name)
-{
- int ret;
- int32_t res;
- TDB_DATA data;
-
- data.dptr = (uint8_t *)&dbid;
- data.dsize = sizeof(dbid);
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_GET_DBNAME, 0, data,
- mem_ctx, &data, &res, &timeout, NULL);
- if (ret != 0 || res != 0) {
- return -1;
- }
-
- (*name) = talloc_strndup(mem_ctx, (const char *)data.dptr, data.dsize);
- if ((*name) == NULL) {
- return -1;
- }
-
- talloc_free(data.dptr);
-
- return 0;
-}
-
-/*
- create a database
- */
-int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout,
- uint32_t destnode, TALLOC_CTX *mem_ctx,
- const char *name, uint8_t db_flags, uint32_t *db_id)
-{
- int ret;
- int32_t res;
- TDB_DATA data;
- uint32_t opcode;
-
- data.dptr = discard_const(name);
- data.dsize = strlen(name)+1;
-
- if (db_flags & CTDB_DB_FLAGS_PERSISTENT) {
- opcode = CTDB_CONTROL_DB_ATTACH_PERSISTENT;
- } else if (db_flags & CTDB_DB_FLAGS_REPLICATED) {
- opcode = CTDB_CONTROL_DB_ATTACH_REPLICATED;
- } else {
- opcode = CTDB_CONTROL_DB_ATTACH;
- }
-
- ret = ctdb_control(ctdb,
- destnode,
- 0,
- opcode,
- CTDB_CTRL_FLAG_ATTACH_RECOVERY,
- data,
- mem_ctx,
- &data,
- &res,
- &timeout,
- NULL);
-
- if (ret != 0 || res != 0) {
- return -1;
- }
-
- if (data.dsize != sizeof(uint32_t)) {
- TALLOC_FREE(data.dptr);
- return -1;
- }
- if (db_id != NULL) {
- *db_id = *(uint32_t *)data.dptr;
- }
- talloc_free(data.dptr);
-
- return 0;
-}
-
-/*
get debug level on a node
*/
int ctdb_ctrl_get_debuglevel(struct ctdb_context *ctdb, uint32_t destnode, int32_t *level)