ctdb-protocol: Do not pass tdb open flags to DB attach controls
authorAmitay Isaacs <amitay@gmail.com>
Tue, 21 Mar 2017 04:02:56 +0000 (15:02 +1100)
committerMartin Schwenke <martins@samba.org>
Mon, 26 Jun 2017 18:10:38 +0000 (20:10 +0200)
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

ctdb/client/client_control_sync.c
ctdb/client/client_db.c
ctdb/protocol/protocol_api.h
ctdb/protocol/protocol_client.c

index 653a3fe6f0a2c879bd48b3c00708d59e583b4951..db2d7be15bee25f5e5f6d1950d908a92580b8fea 100644 (file)
@@ -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) {
index f42f36a060d9233f9ee06291c9ba42469c552836..8cf08aed7dc263aa74af171307d6af730dd3537a 100644 (file)
@@ -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,
index dac0695b74fd81a84b3feb02f588622b78788399..5666069787c4ae563047d71e32491f0f708c0244 100644 (file)
@@ -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);
 
index 5d243a2242346f244c47f88f77ae1a08a49a7e62..018e1578fcb938b38458435581149c32c95988dc 100644 (file)
@@ -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;