ctdb-client: Remove code to set/get_db_priority from new client code
authorAmitay Isaacs <amitay@gmail.com>
Tue, 19 Jul 2016 07:37:40 +0000 (17:37 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 25 Jul 2016 19:29:42 +0000 (21:29 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/client/client.h
ctdb/client/client_control_sync.c

index 6f4eccbf23368723245267c0027e92887f69da6d..4cae4773e063f115373e07c3f052debb1a840909 100644 (file)
@@ -548,16 +548,6 @@ int ctdb_ctrl_get_ban_state(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                            int destnode, struct timeval timeout,
                            struct ctdb_ban_state **ban_state);
 
-int ctdb_ctrl_set_db_priority(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                             struct ctdb_client_context *client,
-                             int destnode, struct timeval timeout,
-                             uint32_t db_id, int priority);
-
-int ctdb_ctrl_get_db_priority(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                             struct ctdb_client_context *client,
-                             int destnode, struct timeval timeout,
-                             uint32_t db_id, uint32_t *priority);
-
 int ctdb_ctrl_transaction_cancel(TALLOC_CTX *mem_ctx,
                                 struct tevent_context *ev,
                                 struct ctdb_client_context *client,
index 5963aa9f22cfa3698872717df191626242d3f31e..923b7176070030ed2b9109b3118a36773e7f52e6 100644 (file)
@@ -1990,68 +1990,6 @@ int ctdb_ctrl_get_ban_state(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
        return 0;
 }
 
-int ctdb_ctrl_set_db_priority(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                             struct ctdb_client_context *client,
-                             int destnode, struct timeval timeout,
-                             uint32_t db_id, int priority)
-{
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
-       struct ctdb_db_priority db_prio;
-       int ret;
-
-       db_prio.db_id = db_id;
-       db_prio.priority = priority;
-
-       ctdb_req_control_set_db_priority(&request, &db_prio);
-       ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
-                                 &request, &reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control SET_DB_PRIORITY failed to node %u, ret=%d\n",
-                      destnode, ret));
-               return ret;
-       }
-
-       ret = ctdb_reply_control_set_db_priority(reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control SET_DB_PRIORITY failed, ret=%d\n", ret));
-               return ret;
-       }
-
-       return 0;
-}
-
-int ctdb_ctrl_get_db_priority(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                             struct ctdb_client_context *client,
-                             int destnode, struct timeval timeout,
-                             uint32_t db_id, uint32_t *priority)
-{
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
-       int ret;
-
-       ctdb_req_control_get_db_priority(&request, db_id);
-       ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
-                                 &request, &reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control GET_DB_PRIORITY failed to node %u, ret=%d\n",
-                      destnode, ret));
-               return ret;
-       }
-
-       ret = ctdb_reply_control_get_db_priority(reply, priority);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control GET_DB_PRIORITY failed, ret=%d\n", ret));
-               return ret;
-       }
-
-       return 0;
-}
-
 int ctdb_ctrl_transaction_cancel(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                                 struct ctdb_client_context *client,
                                 int destnode, struct timeval timeout,