Use same steps for clvmd as for dmeventd - using C locales to avoid reading
large mmaps and use mlockall() for threaded version.
Version 2.02.63 -
================================
+ Use C locales and use_mlockall for clvmd.
Refactor code related to vg->pvs list and add pv->vg link.
Mask LCK_HOLD flag in cluster VG locks for compatibility reasons.
Add activation/polling_interval to lvm.conf as --interval default.
return debug_clvmd(debug, clusterwide_opt)==1?0:1;
}
+ /*
+ * Switch to C locale to avoid reading large locale-archive file
+ * used by some glibc (on some distributions it takes over 100MB).
+ * Daemon currently needs to use mlockall().
+ */
+ setenv("LANG", "C", 1);
+
/* Fork into the background (unless requested not to) */
if (debug != DEBUG_STDERR) {
be_daemon(start_timeout);
/* Trap log messages so we can pass them back to the user */
init_log_fn(lvm2_log_fn);
+ memlock_inc_daemon(cmd);
return 1;
}
void destroy_lvm(void)
{
- if (cmd)
+ if (cmd) {
+ memlock_dec_daemon(cmd);
destroy_toolcontext(cmd);
+ }
cmd = NULL;
}