1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-daemon: Instead of passing ctdb context, pass valgrinding boolean

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2014-06-06 15:08:22 +10:00 committed by Martin Schwenke
parent e114830124
commit 22f71579a4
4 changed files with 6 additions and 6 deletions

View File

@ -406,14 +406,14 @@ unsigned ctdb_addr_to_port(ctdb_sock_addr *addr)
/* we don't lock future pages here; it would increase the chance that
* we'd fail to mmap later on. */
void ctdb_lockdown_memory(struct ctdb_context *ctdb)
void ctdb_lockdown_memory(bool valgrinding)
{
#if defined(HAVE_MLOCKALL) && !defined(_AIX_)
/* Extra stack, please! */
char dummy[10000];
memset(dummy, 0, sizeof(dummy));
if (ctdb->valgrinding) {
if (valgrinding) {
return;
}

View File

@ -1370,7 +1370,7 @@ int ctdb_repack(struct ctdb_context *ctdb, int argc, const char **argv);
int32_t ctdb_monitoring_mode(struct ctdb_context *ctdb);
bool ctdb_stopped_monitoring(struct ctdb_context *ctdb);
int ctdb_set_child_logging(struct ctdb_context *ctdb);
void ctdb_lockdown_memory(struct ctdb_context *ctdb);
void ctdb_lockdown_memory(bool valgrinding);
struct client_async_data {
enum ctdb_controls opcode;

View File

@ -1317,8 +1317,8 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
exit(1);
}
ctdb_lockdown_memory(ctdb);
ctdb_lockdown_memory(ctdb->valgrinding);
/* go into a wait loop to allow other nodes to complete */
event_loop_wait(ctdb->ev);

View File

@ -1151,7 +1151,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
outdata->dsize = sizeof(db->db_id);
/* Try to ensure it's locked in mem */
ctdb_lockdown_memory(ctdb);
ctdb_lockdown_memory(ctdb->valgrinding);
/* tell all the other nodes about this database */
ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, tdb_flags,