]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-client: Drop client code for global transaction controls
authorAmitay Isaacs <amitay@gmail.com>
Mon, 25 Jul 2016 05:49:20 +0000 (15:49 +1000)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 03:00:17 +0000 (05:00 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/client/client.h
ctdb/client/client_control_sync.c

index 4cae4773e063f115373e07c3f052debb1a840909..3d6292c88a51ccee22647abd45747a897c65ecbb 100644 (file)
@@ -412,17 +412,6 @@ int ctdb_ctrl_send_gratuitous_arp(TALLOC_CTX *mem_ctx,
                                  int destnode, struct timeval timeout,
                                  struct ctdb_addr_info *addr_info);
 
-int ctdb_ctrl_transaction_start(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                               struct ctdb_client_context *client,
-                               int destnode, struct timeval timeout,
-                               uint32_t tid);
-
-int ctdb_ctrl_transaction_commit(TALLOC_CTX *mem_ctx,
-                                struct tevent_context *ev,
-                                struct ctdb_client_context *client,
-                                int destnode, struct timeval timeout,
-                                uint32_t tid);
-
 int ctdb_ctrl_wipe_database(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                            struct ctdb_client_context *client,
                            int destnode, struct timeval timeout,
@@ -548,12 +537,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_transaction_cancel(TALLOC_CTX *mem_ctx,
-                                struct tevent_context *ev,
-                                struct ctdb_client_context *client,
-                                int destnode, struct timeval timeout,
-                                uint32_t tid);
-
 int ctdb_ctrl_register_notify(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                              struct ctdb_client_context *client,
                              int destnode, struct timeval timeout,
index 923b7176070030ed2b9109b3118a36773e7f52e6..07f23bfb638bd96d3e2ebdd3191c1d6e56ea524b 100644 (file)
@@ -1177,66 +1177,6 @@ int ctdb_ctrl_send_gratuitous_arp(TALLOC_CTX *mem_ctx,
        return 0;
 }
 
-int ctdb_ctrl_transaction_start(TALLOC_CTX *mem_ctx,
-                               struct tevent_context *ev,
-                               struct ctdb_client_context *client,
-                               int destnode, struct timeval timeout,
-                               uint32_t tid)
-{
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
-       int ret;
-
-       ctdb_req_control_transaction_start(&request, tid);
-       ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
-                                 &request, &reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control TRANSACTION_START failed to node %u, ret=%d\n",
-                      destnode, ret));
-               return ret;
-       }
-
-       ret = ctdb_reply_control_transaction_start(reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control TRANSACTION_START failed, ret=%d\n", ret));
-               return ret;
-       }
-
-       return 0;
-}
-
-int ctdb_ctrl_transaction_commit(TALLOC_CTX *mem_ctx,
-                                struct tevent_context *ev,
-                                struct ctdb_client_context *client,
-                                int destnode, struct timeval timeout,
-                                uint32_t tid)
-{
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
-       int ret;
-
-       ctdb_req_control_transaction_commit(&request, tid);
-       ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
-                                 &request, &reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control TRANSACTION_COMMIT failed to node %u, ret=%d\n",
-                      destnode, ret));
-               return ret;
-       }
-
-       ret = ctdb_reply_control_transaction_commit(reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control TRANSACTION_COMMIT failed, ret=%d\n", ret));
-               return ret;
-       }
-
-       return 0;
-}
-
 int ctdb_ctrl_wipe_database(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                            struct ctdb_client_context *client,
                            int destnode, struct timeval timeout,
@@ -1990,35 +1930,6 @@ int ctdb_ctrl_get_ban_state(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
        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,
-                                uint32_t tid)
-{
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
-       int ret;
-
-       ctdb_req_control_transaction_cancel(&request, tid);
-       ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
-                                 &request, &reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control TRANSACTION_CANCEL failed to node %u, ret=%d\n",
-                      destnode, ret));
-               return ret;
-       }
-
-       ret = ctdb_reply_control_transaction_cancel(reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control TRANSACTION_CANCEL failed, ret=%d\n", ret));
-               return ret;
-       }
-
-       return 0;
-}
-
 int ctdb_ctrl_register_notify(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                              struct ctdb_client_context *client,
                              int destnode, struct timeval timeout,