summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2016-07-25 15:54:16 +1000
committerStefan Metzmacher <metze@samba.org>2016-07-28 05:00:17 +0200
commit28f62be32e8aa9547d9be19e19f933c1f4828db6 (patch)
tree613c21888d08449b8381ba9451ed2903c60f693b
parent24635e955c0a9b2fd1f87f531d526d3c2feba14b (diff)
downloadsamba-28f62be32e8aa9547d9be19e19f933c1f4828db6.tar.gz
ctdb-protocol: Drop marshalling for global transaction controls
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
-rw-r--r--ctdb/protocol/protocol.h1
-rw-r--r--ctdb/protocol/protocol_api.h12
-rw-r--r--ctdb/protocol/protocol_client.c63
-rw-r--r--ctdb/protocol/protocol_control.c38
-rw-r--r--ctdb/tests/src/protocol_client_test.c40
5 files changed, 0 insertions, 154 deletions
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h
index 626423e1d12..caf9d07ecd9 100644
--- a/ctdb/protocol/protocol.h
+++ b/ctdb/protocol/protocol.h
@@ -855,7 +855,6 @@ struct ctdb_req_control_data {
struct ctdb_tickle_list *tickles;
struct ctdb_client_id *cid;
struct ctdb_addr_info *addr_info;
- uint32_t tid;
struct ctdb_transdb *transdb;
const char *event_str;
struct ctdb_public_ip *pubip;
diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h
index 2c1977589f6..d5d00da70f0 100644
--- a/ctdb/protocol/protocol_api.h
+++ b/ctdb/protocol/protocol_api.h
@@ -359,14 +359,6 @@ void ctdb_req_control_send_gratuitous_arp(struct ctdb_req_control *request,
struct ctdb_addr_info *addr_info);
int ctdb_reply_control_send_gratuitous_arp(struct ctdb_reply_control *reply);
-void ctdb_req_control_transaction_start(struct ctdb_req_control *request,
- uint32_t tid);
-int ctdb_reply_control_transaction_start(struct ctdb_reply_control *reply);
-
-void ctdb_req_control_transaction_commit(struct ctdb_req_control *request,
- uint32_t tid);
-int ctdb_reply_control_transaction_commit(struct ctdb_reply_control *reply);
-
void ctdb_req_control_wipe_database(struct ctdb_req_control *request,
struct ctdb_transdb *transdb);
int ctdb_reply_control_wipe_database(struct ctdb_reply_control *reply);
@@ -484,10 +476,6 @@ int ctdb_reply_control_get_ban_state(struct ctdb_reply_control *reply,
TALLOC_CTX *mem_ctx,
struct ctdb_ban_state **ban_state);
-void ctdb_req_control_transaction_cancel(struct ctdb_req_control *request,
- uint32_t tid);
-int ctdb_reply_control_transaction_cancel(struct ctdb_reply_control *reply);
-
void ctdb_req_control_register_notify(struct ctdb_req_control *request,
struct ctdb_notify_data *notify);
int ctdb_reply_control_register_notify(struct ctdb_reply_control *reply);
diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c
index cef08191fed..14f3accf5ce 100644
--- a/ctdb/protocol/protocol_client.c
+++ b/ctdb/protocol/protocol_client.c
@@ -1066,48 +1066,6 @@ int ctdb_reply_control_send_gratuitous_arp(struct ctdb_reply_control *reply)
CTDB_CONTROL_SEND_GRATUITOUS_ARP);
}
-/* CTDB_CONTROL_TRANSACTION_START */
-
-void ctdb_req_control_transaction_start(struct ctdb_req_control *request,
- uint32_t tid)
-{
- request->opcode = CTDB_CONTROL_TRANSACTION_START;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_TRANSACTION_START;
- request->rdata.data.tid = tid;
-}
-
-int ctdb_reply_control_transaction_start(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply,
- CTDB_CONTROL_TRANSACTION_START);
-}
-
-/* CTDB_CONTROL_TRANSACTION_COMMIT */
-
-void ctdb_req_control_transaction_commit(struct ctdb_req_control *request,
- uint32_t tid)
-{
- request->opcode = CTDB_CONTROL_TRANSACTION_COMMIT;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_TRANSACTION_COMMIT;
- request->rdata.data.tid = tid;
-}
-
-int ctdb_reply_control_transaction_commit(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply,
- CTDB_CONTROL_TRANSACTION_COMMIT);
-}
-
/* CTDB_CONTROL_WIPE_DATABASE */
void ctdb_req_control_wipe_database(struct ctdb_req_control *request,
@@ -1737,27 +1695,6 @@ int ctdb_reply_control_get_ban_state(struct ctdb_reply_control *reply,
return reply->status;
}
-/* CTDB_CONTROL_TRANSACTION_CANCEL */
-
-void ctdb_req_control_transaction_cancel(struct ctdb_req_control *request,
- uint32_t tid)
-{
- request->opcode = CTDB_CONTROL_TRANSACTION_CANCEL;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_TRANSACTION_CANCEL;
- request->rdata.data.tid = tid;
-}
-
-int ctdb_reply_control_transaction_cancel(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply,
- CTDB_CONTROL_TRANSACTION_CANCEL);
-}
-
/* CTDB_CONTROL_REGISTER_NOTIFY */
void ctdb_req_control_register_notify(struct ctdb_req_control *request,
diff --git a/ctdb/protocol/protocol_control.c b/ctdb/protocol/protocol_control.c
index a478629e9f6..d5237ecc609 100644
--- a/ctdb/protocol/protocol_control.c
+++ b/ctdb/protocol/protocol_control.c
@@ -220,14 +220,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
len = ctdb_addr_info_len(cd->data.addr_info);
break;
- case CTDB_CONTROL_TRANSACTION_START:
- len = ctdb_uint32_len(cd->data.tid);
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- len = ctdb_uint32_len(cd->data.tid);
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
len = ctdb_transdb_len(cd->data.transdb);
break;
@@ -330,9 +322,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
case CTDB_CONTROL_GET_BAN_STATE:
break;
- case CTDB_CONTROL_TRANSACTION_CANCEL:
- break;
-
case CTDB_CONTROL_REGISTER_NOTIFY:
len = ctdb_notify_data_len(cd->data.notify);
break;
@@ -573,14 +562,6 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd,
ctdb_addr_info_push(cd->data.addr_info, buf);
break;
- case CTDB_CONTROL_TRANSACTION_START:
- ctdb_uint32_push(cd->data.tid, buf);
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- ctdb_uint32_push(cd->data.tid, buf);
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
ctdb_transdb_push(cd->data.transdb, buf);
break;
@@ -892,16 +873,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen,
&cd->data.addr_info);
break;
- case CTDB_CONTROL_TRANSACTION_START:
- ret = ctdb_uint32_pull(buf, buflen, mem_ctx,
- &cd->data.tid);
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- ret = ctdb_uint32_pull(buf, buflen, mem_ctx,
- &cd->data.tid);
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
ret = ctdb_transdb_pull(buf, buflen, mem_ctx,
&cd->data.transdb);
@@ -1272,12 +1243,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd)
case CTDB_CONTROL_SEND_GRATUITOUS_ARP:
break;
- case CTDB_CONTROL_TRANSACTION_START:
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
break;
@@ -1379,9 +1344,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd)
case CTDB_CONTROL_GET_DB_PRIORITY:
break;
- case CTDB_CONTROL_TRANSACTION_CANCEL:
- break;
-
case CTDB_CONTROL_REGISTER_NOTIFY:
break;
diff --git a/ctdb/tests/src/protocol_client_test.c b/ctdb/tests/src/protocol_client_test.c
index aafb741e63c..e8e4485f8e8 100644
--- a/ctdb/tests/src/protocol_client_test.c
+++ b/ctdb/tests/src/protocol_client_test.c
@@ -334,14 +334,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
fill_ctdb_addr_info(mem_ctx, cd->data.addr_info);
break;
- case CTDB_CONTROL_TRANSACTION_START:
- cd->data.tid = rand32();
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- cd->data.tid = rand32();
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
cd->data.transdb = talloc(mem_ctx, struct ctdb_transdb);
assert(cd->data.transdb != NULL);
@@ -469,9 +461,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
case CTDB_CONTROL_GET_BAN_STATE:
break;
- case CTDB_CONTROL_TRANSACTION_CANCEL:
- break;
-
case CTDB_CONTROL_REGISTER_NOTIFY:
cd->data.notify = talloc(mem_ctx, struct ctdb_notify_data);
assert(cd->data.notify != NULL);
@@ -798,14 +787,6 @@ static void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
verify_ctdb_addr_info(cd->data.addr_info, cd2->data.addr_info);
break;
- case CTDB_CONTROL_TRANSACTION_START:
- assert(cd->data.tid == cd2->data.tid);
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- assert(cd->data.tid == cd2->data.tid);
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
verify_ctdb_transdb(cd->data.transdb, cd2->data.transdb);
break;
@@ -915,9 +896,6 @@ static void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
case CTDB_CONTROL_GET_BAN_STATE:
break;
- case CTDB_CONTROL_TRANSACTION_CANCEL:
- break;
-
case CTDB_CONTROL_REGISTER_NOTIFY:
verify_ctdb_notify_data(cd->data.notify, cd2->data.notify);
break;
@@ -1248,12 +1226,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
case CTDB_CONTROL_SEND_GRATUITOUS_ARP:
break;
- case CTDB_CONTROL_TRANSACTION_START:
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
break;
@@ -1368,9 +1340,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
fill_ctdb_ban_state(mem_ctx, cd->data.ban_state);
break;
- case CTDB_CONTROL_TRANSACTION_CANCEL:
- break;
-
case CTDB_CONTROL_REGISTER_NOTIFY:
break;
@@ -1637,12 +1606,6 @@ static void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
case CTDB_CONTROL_SEND_GRATUITOUS_ARP:
break;
- case CTDB_CONTROL_TRANSACTION_START:
- break;
-
- case CTDB_CONTROL_TRANSACTION_COMMIT:
- break;
-
case CTDB_CONTROL_WIPE_DATABASE:
break;
@@ -1741,9 +1704,6 @@ static void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
verify_ctdb_ban_state(cd->data.ban_state, cd2->data.ban_state);
break;
- case CTDB_CONTROL_TRANSACTION_CANCEL:
- break;
-
case CTDB_CONTROL_REGISTER_NOTIFY:
break;