mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +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:
parent
e114830124
commit
22f71579a4
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user