summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-03-02 14:47:20 +1100
committerMartin Schwenke <martins@samba.org>2017-06-26 15:47:24 +0200
commit8d3f2f691e1b95fea3965ab40084e327780ff0d5 (patch)
tree6d0cbd3262d1d14d9cabfe3e084680473be09c0b /ctdb
parentea91967b0df5f260f7da6532628f015f26f6d0e0 (diff)
downloadsamba-8d3f2f691e1b95fea3965ab40084e327780ff0d5.tar.gz
ctdb-daemon: Drop extra boolean arguments to ctdb_local_attach()
There is no need for with_jenkinshash and with_mutexes flags, since the tdb_flags are now calculated based on database type. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_ltdb_server.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c
index 2790dd6ea7e..b016537a312 100644
--- a/ctdb/server/ctdb_ltdb_server.c
+++ b/ctdb/server/ctdb_ltdb_server.c
@@ -757,8 +757,7 @@ int ctdb_set_db_readonly(struct ctdb_context *ctdb, struct ctdb_db_context *ctdb
return 0 on success, -1 on failure
*/
static int ctdb_local_attach(struct ctdb_context *ctdb, const char *db_name,
- bool persistent, const char *unhealthy_reason,
- bool jenkinshash, bool mutexes)
+ bool persistent, const char *unhealthy_reason)
{
struct ctdb_db_context *ctdb_db, *tmp_db;
int ret;
@@ -1118,7 +1117,6 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
struct ctdb_db_context *db;
struct ctdb_node *node = ctdb->nodes[ctdb->pnn];
struct ctdb_client *client = NULL;
- bool with_jenkinshash, with_mutexes;
if (ctdb->tunable.allow_client_db_attach == 0) {
DEBUG(DEBUG_ERR, ("DB Attach to database %s denied by tunable "
@@ -1183,11 +1181,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
return 0;
}
- with_jenkinshash = persistent ? false : true;
- with_mutexes = (ctdb->tunable.mutex_enabled == 1) ? true : false;
-
- if (ctdb_local_attach(ctdb, db_name, persistent, NULL,
- with_jenkinshash, with_mutexes) != 0) {
+ if (ctdb_local_attach(ctdb, db_name, persistent, NULL) != 0) {
return -1;
}
@@ -1357,7 +1351,7 @@ static int ctdb_attach_persistent(struct ctdb_context *ctdb,
}
p[4] = 0;
- if (ctdb_local_attach(ctdb, s, true, unhealthy_reason, false, false) != 0) {
+ if (ctdb_local_attach(ctdb, s, true, unhealthy_reason) != 0) {
DEBUG(DEBUG_ERR,("Failed to attach to persistent database '%s'\n", de->d_name));
closedir(d);
talloc_free(s);