/* 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;
}
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;
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);
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,