summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-02-11 17:57:42 +1100
committerMartin Schwenke <martins@samba.org>2014-03-04 01:02:11 +0100
commitaf3a168ed3b0dcac4086d2d90bfdef65590b68dc (patch)
treeb4fb22d70e41bdd334fd87a12a4713ee1928f916
parent44520dcefc226ff1a93f77c8c7cf79d1c5244c3a (diff)
downloadsamba-af3a168ed3b0dcac4086d2d90bfdef65590b68dc.tar.gz
samba-af3a168ed3b0dcac4086d2d90bfdef65590b68dc.tar.xz
samba-af3a168ed3b0dcac4086d2d90bfdef65590b68dc.zip
ctdb-util: Do not use mlockall() on AIX
Memory lockdown causes recovery daemon to crash on AIX. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
-rw-r--r--ctdb/common/ctdb_util.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c
index 44eb0db48b..fd0d7da1d8 100644
--- a/ctdb/common/ctdb_util.c
+++ b/ctdb/common/ctdb_util.c
@@ -735,7 +735,7 @@ int32_t get_debug_by_desc(const char *desc)
* we'd fail to mmap later on. */
void ctdb_lockdown_memory(struct ctdb_context *ctdb)
{
-#ifdef HAVE_MLOCKALL
+#if defined(HAVE_MLOCKALL) && !defined(_AIX_)
/* Extra stack, please! */
char dummy[10000];
memset(dummy, 0, sizeof(dummy));
@@ -744,11 +744,6 @@ void ctdb_lockdown_memory(struct ctdb_context *ctdb)
return;
}
- /* TODO: Add a command line option to disable memory lockdown.
- * This can be a performance issue on AIX since fork() copies
- * all locked memory pages.
- */
-
/* Ignore when running in local daemons mode */
if (getuid() != 0) {
return;