mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tools: preselect some setting for memlocked daemons
When our daemon is locked into memory - avoid communication with dmeventd and also skip suspended devices.
This commit is contained in:
parent
7b78d496bf
commit
d2c4ce254b
@ -123,7 +123,8 @@ void init_mirror_in_sync(int in_sync)
|
||||
|
||||
void init_dmeventd_monitor(int reg)
|
||||
{
|
||||
_dmeventd_monitor = reg;
|
||||
if (!memlock_count_daemon())
|
||||
_dmeventd_monitor = reg;
|
||||
}
|
||||
|
||||
void init_background_polling(int polling)
|
||||
@ -133,7 +134,8 @@ void init_background_polling(int polling)
|
||||
|
||||
void init_ignore_suspended_devices(int ignore)
|
||||
{
|
||||
_ignore_suspended_devices = ignore;
|
||||
if (!memlock_count_daemon())
|
||||
_ignore_suspended_devices = ignore;
|
||||
}
|
||||
|
||||
void init_ignore_lvm_mirrors(int scan)
|
||||
|
@ -79,9 +79,11 @@ int lvm2_run(void *handle, const char *cmdline)
|
||||
|
||||
/* FIXME Temporary - move to libdevmapper */
|
||||
ret = ECMD_PROCESSED;
|
||||
if (!strcmp(cmdline, "_memlock_inc"))
|
||||
if (!strcmp(cmdline, "_memlock_inc")) {
|
||||
init_dmeventd_monitor(DMEVENTD_MONITOR_IGNORE);
|
||||
init_ignore_suspended_devices(1);
|
||||
memlock_inc_daemon(cmd);
|
||||
else if (!strcmp(cmdline, "_memlock_dec"))
|
||||
} else if (!strcmp(cmdline, "_memlock_dec"))
|
||||
memlock_dec_daemon(cmd);
|
||||
else
|
||||
ret = lvm_run_command(cmd, argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user