Skip to contentSkip to conversation

master - lvconvert: prevent combining split snapshots in shared vg

PATCH David Teigland 1 participant 1 message Nov 21, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=175d06a92940dda5de3a7631e3d27cd6828a16be
Commit:        175d06a92940dda5de3a7631e3d27cd6828a16be
Parent:        ea0463791dcc68082ecf0b6b6681e82becaffb40
Author:        David Teigland <[email protected]>
AuthorDate:    Tue Nov 21 11:45:49 2017 -0600
Committer:     David Teigland <[email protected]>
CommitterDate: Tue Nov 21 11:45:49 2017 -0600

lvconvert: prevent combining split snapshots in shared vg

splitting snapshots was already prevented.

---
 tools/lvconvert.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
tools/lvconvert.c +5 -0
index eab7e6d..ed1a130 100644
@@ -3828,6 +3828,11 @@ static int _lvconvert_combine_split_snapshot_single(struct cmd_context *cmd,
 {
 	const char *origin_name = cmd->position_argv[0];
 
+	if (is_lockd_type(lv->vg->lock_type)) {
+		log_error("Unable to combine split snapshots in VG with lock_type %s", lv->vg->lock_type);
+		return ECMD_FAILED;
+	}
+
 	/* If origin_name includes VG name, the VG name is removed. */
 	if (!validate_lvname_param(cmd, &lv->vg->name, &origin_name))
 		return_ECMD_FAILED;