summaryrefslogtreecommitdiffstats
path: root/lib/locking/file_locking.c
diff options
context:
space:
mode:
authorJonathan Earl Brassow <jbrassow@redhat.com>2012-01-20 00:27:18 +0000
committerJonathan Earl Brassow <jbrassow@redhat.com>2012-01-20 00:27:18 +0000
commit25d1410592aa4b928a8449038dab2eefab3d6e61 (patch)
tree71a45a07d8471cd4af283c30078f66c1b83f9f0d /lib/locking/file_locking.c
parent2f65269b77e3856591b7f83fa379044acdadbeab (diff)
downloadlvm2-25d1410592aa4b928a8449038dab2eefab3d6e61.tar.gz
lvm2-25d1410592aa4b928a8449038dab2eefab3d6e61.tar.xz
lvm2-25d1410592aa4b928a8449038dab2eefab3d6e61.zip
Preserve exclusive activation of cluster mirror when converting.
This patch to the suspend code - like the similar change for resume - queries the lock mode of a cluster volume and records whether it is active exclusively. This is necessary for suspend due to the possibility of preloading targets. Failure to check to exclusivity causes the cluster target of an exclusively activated mirror to be used when converting - rather than the single machine target.
Diffstat (limited to 'lib/locking/file_locking.c')
-rw-r--r--lib/locking/file_locking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c
index 468c8b50..3ecea8c9 100644
--- a/lib/locking/file_locking.c
+++ b/lib/locking/file_locking.c
@@ -312,7 +312,7 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource,
break;
case LCK_WRITE:
log_very_verbose("Locking LV %s (W)%s", resource, origin_only ? " without snapshots" : "");
- if (!lv_suspend_if_active(cmd, resource, origin_only))
+ if (!lv_suspend_if_active(cmd, resource, origin_only, 0))
return 0;
break;
case LCK_EXCL: