summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-11-05 15:14:58 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2014-11-05 15:29:43 +0100
commita3a2c792a87054ab78a1b8e54b99db1c24739fb8 (patch)
treecb9de065a4f3bf3fcd5b256a3853079425da76da /tools
parenta82dcadf66dbd43a43d3be40cd62a5074248d218 (diff)
downloadlvm2-a3a2c792a87054ab78a1b8e54b99db1c24739fb8.tar.gz
lv: lv_active_change add needs_exclusive flag
Let's use this function for more activations in the code. 'needs_exlusive' will enforce exlusive type for any given LV. We may want to activate LV in exlusive mode, even when we know the LV (as is) supports non-exlusive activation as well. lvcreate -ay -> exclusive & local lvcreate -aay -> exclusive & local lvcreate -aly -> exclusive & local lvcreate -aey -> exclusive (might be on any node).
Diffstat (limited to 'tools')
-rw-r--r--tools/lvchange.c2
-rw-r--r--tools/toollib.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 99dba8292..e0bb4b1e1 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -593,7 +593,7 @@ static int lvchange_persistent(struct cmd_context *cmd,
if (activate != CHANGE_AN) {
log_verbose("Re-activating logical volume %s", display_lvname(lv));
- if (!lv_active_change(cmd, lv, activate)) {
+ if (!lv_active_change(cmd, lv, activate, 0)) {
log_error("%s: reactivation failed", display_lvname(lv));
backup(lv->vg);
return 0;
diff --git a/tools/toollib.c b/tools/toollib.c
index 5906ccb7a..596dba543 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -731,7 +731,7 @@ int lv_change_activate(struct cmd_context *cmd, struct logical_volume *lv,
}
}
- if (!lv_active_change(cmd, lv, activate))
+ if (!lv_active_change(cmd, lv, activate, 0))
return_0;
if (background_polling() &&