Skip to contentSkip to conversation

master - activation: suspend pvmove using lv.

PATCH Zdenek Kabelac 1 participant 1 message Nov 15, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=35b207946a514c411e4d7c9be235e093ae5adf7d
Commit:        35b207946a514c411e4d7c9be235e093ae5adf7d
Parent:        9e2a68a981a44579b19108554b8f89a860eb9d59
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Nov 15 12:08:33 2017 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Nov 15 14:03:22 2017 +0100

activation: suspend pvmove using lv.

Whenever pvmove tree is going to be generated for suspend and such LV has a user - use this 'using LV' to generate correct dm tree holding all components.

---
 lib/activate/activate.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
lib/activate/activate.c +6 -0
index 05aea85..0dc67f2 100644
@@ -2161,6 +2161,12 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
 		}
 		if (!_lv_preload(lv_pre_tmp, laopts, &flush_required))
 			goto_out;
+
+		/* Suspending 1st. LV above PVMOVE suspends whole tree */
+		dm_list_iterate_items(sl, &pvmove_lv->segs_using_this_lv) {
+			lv = sl->seg->lv;
+			break;
+		}
 	} else {
 		if (!_lv_preload(lv_pre, laopts, &flush_required))
 			/* FIXME Revert preloading */