summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lvchange.c7
-rw-r--r--tools/lvcreate.c4
-rw-r--r--tools/lvmcmdline.c6
-rw-r--r--tools/toollib.c11
-rw-r--r--tools/toollib.h1
-rw-r--r--tools/vgchange.c6
6 files changed, 7 insertions, 28 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index ac761779..58581918 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -524,7 +524,7 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle __attribute__((unused)))
{
int doit = 0, docmds = 0;
- int dmeventd_mode, archived = 0;
+ int archived = 0;
struct logical_volume *origin;
char snaps_msg[128];
@@ -595,11 +595,6 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
return ECMD_FAILED;
}
- if (!get_activation_monitoring_mode(cmd, lv->vg, &dmeventd_mode))
- return ECMD_FAILED;
-
- init_dmeventd_monitor(dmeventd_mode);
-
/*
* FIXME: DEFAULT_BACKGROUND_POLLING should be "unspecified".
* If --poll is explicitly provided use it; otherwise polling
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index c7a347f9..7d3a5b0f 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -726,10 +726,6 @@ static int _lvcreate_params(struct lvcreate_params *lp,
return 0;
}
- if (!get_activation_monitoring_mode(cmd, NULL,
- &lp->activation_monitoring))
- return_0;
-
if (!_lvcreate_name_params(lp, cmd, &argc, &argv) ||
!_read_size_params(lp, lcp, cmd) ||
!get_stripe_params(cmd, &lp->stripes, &lp->stripe_size) ||
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 2b4d51d9..874f5bd0 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -935,6 +935,7 @@ static void _apply_settings(struct cmd_context *cmd)
init_test(cmd->current_settings.test);
init_full_scan_done(0);
init_mirror_in_sync(0);
+ init_dmeventd_monitor(DEFAULT_DMEVENTD_MONITOR);
init_msg_prefix(cmd->default_settings.msg_prefix);
init_cmd_name(cmd->default_settings.cmd_name);
@@ -996,6 +997,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
{
int ret = 0;
int locking_type;
+ int monitoring;
struct dm_config_tree *old_cft;
init_error_message_produced(0);
@@ -1041,6 +1043,10 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
goto_out;
_apply_settings(cmd);
+ if (!get_activation_monitoring_mode(cmd, &monitoring))
+ goto_out;
+ init_dmeventd_monitor(monitoring);
+
log_debug("Processing: %s", cmd->cmd_line);
#ifdef O_DIRECT_SUPPORT
diff --git a/tools/toollib.c b/tools/toollib.c
index bd24dad8..049604a1 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1490,7 +1490,6 @@ int pvcreate_params_validate(struct cmd_context *cmd,
}
int get_activation_monitoring_mode(struct cmd_context *cmd,
- struct volume_group *vg,
int *monitoring_mode)
{
*monitoring_mode = DEFAULT_DMEVENTD_MONITOR;
@@ -1511,16 +1510,6 @@ int get_activation_monitoring_mode(struct cmd_context *cmd,
DEFAULT_DMEVENTD_MONITOR))
*monitoring_mode = DMEVENTD_MONITOR_IGNORE;
- if (vg && vg_is_clustered(vg) &&
- *monitoring_mode == DMEVENTD_MONITOR_IGNORE) {
- log_error("%s is incompatible with clustered Volume Group "
- "\"%s\": Skipping.",
- (arg_count(cmd, ignoremonitoring_ARG) ?
- "--ignoremonitoring" : "activation/monitoring=0"),
- vg->name);
- return 0;
- }
-
return 1;
}
diff --git a/tools/toollib.h b/tools/toollib.h
index 1ef83f68..b3b0a7c1 100644
--- a/tools/toollib.h
+++ b/tools/toollib.h
@@ -110,7 +110,6 @@ int pvcreate_params_validate(struct cmd_context *cmd,
struct pvcreate_params *pp);
int get_activation_monitoring_mode(struct cmd_context *cmd,
- struct volume_group *vg,
int *monitoring_mode);
int get_stripe_params(struct cmd_context *cmd, uint32_t *stripes,
uint32_t *stripe_size);
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 6332117e..e4933eae 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -447,7 +447,6 @@ static int vgchange_single(struct cmd_context *cmd, const char *vg_name,
struct volume_group *vg,
void *handle __attribute__((unused)))
{
- int dmeventd_mode;
int archived = 0;
int i;
@@ -473,11 +472,6 @@ static int vgchange_single(struct cmd_context *cmd, const char *vg_name,
return ECMD_FAILED;
}
- if (!get_activation_monitoring_mode(cmd, vg, &dmeventd_mode))
- return ECMD_FAILED;
-
- init_dmeventd_monitor(dmeventd_mode);
-
/*
* FIXME: DEFAULT_BACKGROUND_POLLING should be "unspecified".
* If --poll is explicitly provided use it; otherwise polling