mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix clvmd cluster propagation of dmeventd monitoring mode.
clvmd's do_lock_lv() already properly controls dmeventd monitoring based on LCK_DMEVENTD_MONITOR_MODE in lock_flags -- though one small fix was needed for this to work: _lock_for_cluster() must treat dmeventd_monitor_mode()'s return as a tri-state value. Also cleanup do_lock_lv() to: - explicitly init_dmeventd_monitor() based on LCK_DMEVENTD_MONITOR_MODE - no longer reset init_dmeventd_monitor() to default at the end of do_lock_lv() -- it is unnecessary
This commit is contained in:
parent
d20956dcb1
commit
7b0f529d3e
@ -1,5 +1,6 @@
|
||||
Version 2.02.63 -
|
||||
================================
|
||||
Fix clvmd cluster propagation of dmeventd monitoring mode.
|
||||
Allow ALLOC_ANYWHERE to split contiguous areas.
|
||||
Use INTERNAL_ERROR for internal errors throughout tree.
|
||||
Add some assertions to allocation code.
|
||||
|
@ -499,7 +499,9 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource)
|
||||
if (lock_flags & LCK_MIRROR_NOSYNC_MODE)
|
||||
init_mirror_in_sync(1);
|
||||
|
||||
if (!(lock_flags & LCK_DMEVENTD_MONITOR_MODE))
|
||||
if (lock_flags & LCK_DMEVENTD_MONITOR_MODE)
|
||||
init_dmeventd_monitor(1);
|
||||
else
|
||||
init_dmeventd_monitor(0);
|
||||
|
||||
cmd->partial_activation = (lock_flags & LCK_PARTIAL_MODE) ? 1 : 0;
|
||||
@ -542,9 +544,6 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource)
|
||||
if (lock_flags & LCK_MIRROR_NOSYNC_MODE)
|
||||
init_mirror_in_sync(0);
|
||||
|
||||
if (!(lock_flags & LCK_DMEVENTD_MONITOR_MODE))
|
||||
init_dmeventd_monitor(DEFAULT_DMEVENTD_MONITOR);
|
||||
|
||||
cmd->partial_activation = 0;
|
||||
|
||||
/* clean the pool for another command */
|
||||
|
@ -307,6 +307,7 @@ static int _lock_for_cluster(struct cmd_context *cmd, unsigned char clvmd_cmd,
|
||||
char *args;
|
||||
const char *node = "";
|
||||
int len;
|
||||
int dmeventd_mode;
|
||||
int saved_errno = errno;
|
||||
lvm_response_t *response = NULL;
|
||||
int num_responses;
|
||||
@ -324,7 +325,12 @@ static int _lock_for_cluster(struct cmd_context *cmd, unsigned char clvmd_cmd,
|
||||
if (mirror_in_sync())
|
||||
args[1] |= LCK_MIRROR_NOSYNC_MODE;
|
||||
|
||||
if (dmeventd_monitor_mode())
|
||||
/*
|
||||
* Must handle tri-state return from dmeventd_monitor_mode.
|
||||
* But DMEVENTD_MONITOR_IGNORE is not propagated across the cluster.
|
||||
*/
|
||||
dmeventd_mode = dmeventd_monitor_mode();
|
||||
if (dmeventd_mode != DMEVENTD_MONITOR_IGNORE && dmeventd_mode)
|
||||
args[1] |= LCK_DMEVENTD_MONITOR_MODE;
|
||||
|
||||
if (cmd->partial_activation)
|
||||
|
Loading…
Reference in New Issue
Block a user