summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-03-21 15:02:56 +1100
committerMartin Schwenke <martins@samba.org>2017-06-26 20:10:38 +0200
commitbcfa12c5b26502230a9c27492cf3a607fc41939d (patch)
treeca27fe5262e5d0f767ed01b4410f6372c4c39631 /ctdb
parent4760fff3ae12673fe6db98a9e1c7f883ffacb75e (diff)
downloadsamba-bcfa12c5b26502230a9c27492cf3a607fc41939d.tar.gz
ctdb-protocol: Do not pass tdb open flags to DB attach controls
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Mon Jun 26 20:10:38 CEST 2017 on sn-devel-144
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/client/client_control_sync.c4
-rw-r--r--ctdb/client/client_db.c4
-rw-r--r--ctdb/protocol/protocol_api.h5
-rw-r--r--ctdb/protocol/protocol_client.c9
4 files changed, 10 insertions, 12 deletions
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;