From bcfa12c5b26502230a9c27492cf3a607fc41939d Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 21 Mar 2017 15:02:56 +1100 Subject: ctdb-protocol: Do not pass tdb open flags to DB attach controls Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Mon Jun 26 20:10:38 CEST 2017 on sn-devel-144 --- ctdb/client/client_control_sync.c | 4 ++-- ctdb/client/client_db.c | 4 ++-- ctdb/protocol/protocol_api.h | 5 ++--- ctdb/protocol/protocol_client.c | 9 ++++----- 4 files changed, 10 insertions(+), 12 deletions(-) (limited to 'ctdb') diff --git a/ctdb/client/client_control_sync.c b/ctdb/client/client_control_sync.c index 653a3fe6f0a..db2d7be15be 100644 --- a/ctdb/client/client_control_sync.c +++ b/ctdb/client/client_control_sync.c @@ -421,7 +421,7 @@ int ctdb_ctrl_db_attach(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct ctdb_reply_control *reply; int ret; - ctdb_req_control_db_attach(&request, db_name, 0); + ctdb_req_control_db_attach(&request, db_name); ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout, &request, &reply); if (ret != 0) { @@ -1126,7 +1126,7 @@ int ctdb_ctrl_db_attach_persistent(TALLOC_CTX *mem_ctx, struct ctdb_reply_control *reply; int ret; - ctdb_req_control_db_attach_persistent(&request, db_name, 0); + ctdb_req_control_db_attach_persistent(&request, db_name); ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout, &request, &reply); if (ret != 0) { diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c index f42f36a060d..8cf08aed7dc 100644 --- a/ctdb/client/client_db.c +++ b/ctdb/client/client_db.c @@ -305,9 +305,9 @@ struct tevent_req *ctdb_attach_send(TALLOC_CTX *mem_ctx, if (state->db->persistent) { ctdb_req_control_db_attach_persistent(&request, - state->db->db_name, 0); + state->db->db_name); } else { - ctdb_req_control_db_attach(&request, state->db->db_name, 0); + ctdb_req_control_db_attach(&request, state->db->db_name); } subreq = ctdb_client_control_send(state, state->ev, state->client, diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h index dac0695b74f..5666069787c 100644 --- a/ctdb/protocol/protocol_api.h +++ b/ctdb/protocol/protocol_api.h @@ -237,7 +237,7 @@ void ctdb_req_control_statistics_reset(struct ctdb_req_control *request); int ctdb_reply_control_statistics_reset(struct ctdb_reply_control *reply); void ctdb_req_control_db_attach(struct ctdb_req_control *request, - const char *db_name, uint32_t tdb_flags); + const char *db_name); int ctdb_reply_control_db_attach(struct ctdb_reply_control *reply, uint32_t *db_id); @@ -346,8 +346,7 @@ void ctdb_req_control_set_tcp_tickle_list(struct ctdb_req_control *request, int ctdb_reply_control_set_tcp_tickle_list(struct ctdb_reply_control *reply); void ctdb_req_control_db_attach_persistent(struct ctdb_req_control *request, - const char *name, - uint32_t tdb_flags); + const char *name); int ctdb_reply_control_db_attach_persistent(struct ctdb_reply_control *reply, uint32_t *db_id); diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c index 5d243a22423..018e1578fcb 100644 --- a/ctdb/protocol/protocol_client.c +++ b/ctdb/protocol/protocol_client.c @@ -399,11 +399,11 @@ int ctdb_reply_control_statistics_reset(struct ctdb_reply_control *reply) /* CTDB_CONTROL_DB_ATTACH */ void ctdb_req_control_db_attach(struct ctdb_req_control *request, - const char *db_name, uint32_t tdb_flags) + const char *db_name) { request->opcode = CTDB_CONTROL_DB_ATTACH; request->pad = 0; - request->srvid = tdb_flags; + request->srvid = 0; request->client_id = 0; request->flags = 0; @@ -999,12 +999,11 @@ int ctdb_reply_control_set_tcp_tickle_list(struct ctdb_reply_control *reply) /* CTDB_CONTROL_DB_ATTACH_PERSISTENT */ void ctdb_req_control_db_attach_persistent(struct ctdb_req_control *request, - const char *db_name, - uint32_t tdb_flags) + const char *db_name) { request->opcode = CTDB_CONTROL_DB_ATTACH_PERSISTENT; request->pad = 0; - request->srvid = tdb_flags; + request->srvid = 0; request->client_id = 0; request->flags = 0; -- cgit v1.2.1