1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00

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.
This commit is contained in:
Jonathan Earl Brassow
2012-01-20 00:27:18 +00:00
parent 2f65269b77
commit 25d1410592
6 changed files with 15 additions and 7 deletions

View File

@ -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: