Blame SOURCES/lvm2-2_02_178-activation-move-check-later.patch

f0aa83
From e3e7ea0c384da84ccd38406482ec1877c6b19d8a Mon Sep 17 00:00:00 2001
f0aa83
From: Zdenek Kabelac <zkabelac@redhat.com>
f0aa83
Date: Wed, 17 Jan 2018 15:15:43 +0100
f0aa83
Subject: [PATCH 25/25] activation: move check later
f0aa83
f0aa83
Check for lv when it's known in all cases.
f0aa83
f0aa83
(cherry picked from commit f3c75bb2014e9ae7d212e0c016a94c529ac8a912)
f0aa83
---
f0aa83
 lib/activate/activate.c | 12 ++++++------
f0aa83
 1 file changed, 6 insertions(+), 6 deletions(-)
f0aa83
f0aa83
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
f0aa83
index b23400a..18cc7cf 100644
f0aa83
--- a/lib/activate/activate.c
f0aa83
+++ b/lib/activate/activate.c
f0aa83
@@ -2568,6 +2568,12 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s,
f0aa83
 	struct lvinfo info;
f0aa83
 	int r = 0;
f0aa83
 
f0aa83
+	if (!activation())
f0aa83
+		return 1;
f0aa83
+
f0aa83
+	if (!lv && !(lv_to_free = lv = lv_from_lvid(cmd, lvid_s, 0)))
f0aa83
+		goto out;
f0aa83
+
f0aa83
 	if (!laopts->exclusive &&
f0aa83
 	    (lv_is_origin(lv) ||
f0aa83
 	     lv_is_pvmove(lv) ||
f0aa83
@@ -2578,12 +2584,6 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s,
f0aa83
 		return 0;
f0aa83
 	}
f0aa83
 
f0aa83
-	if (!activation())
f0aa83
-		return 1;
f0aa83
-
f0aa83
-	if (!lv && !(lv_to_free = lv = lv_from_lvid(cmd, lvid_s, 0)))
f0aa83
-		goto out;
f0aa83
-
f0aa83
 	if (filter && !_passes_activation_filter(cmd, lv)) {
f0aa83
 		log_verbose("Not activating %s since it does not pass "
f0aa83
 			    "activation filter.", display_lvname(lv));
f0aa83
-- 
f0aa83
1.8.3.1
f0aa83