Skip to contentSkip to conversation

master - pvmove: return pvmove itself

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=cc854c0617034613b0335e43eaabf4e4ff2a26bd
Commit:        cc854c0617034613b0335e43eaabf4e4ff2a26bd
Parent:        919744375e21856ee6511f5f7185c3773d60da0b
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Nov 14 20:44:32 2017 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Nov 15 11:51:53 2017 +0100

pvmove: return pvmove itself

When find_pvmove_lv_in_lv() get already a 'pvmoving' LV - return it.

---
 lib/metadata/mirror.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
lib/metadata/mirror.c +3 -0
index 238ce37..c89408c 100644
@@ -1512,6 +1512,9 @@ const struct logical_volume *find_pvmove_lv_in_lv(const struct logical_volume *l
 	const struct lv_segment *seg;
 	uint32_t s;
 
+	if (lv_is_pvmove(lv))
+		return lv;
+
 	dm_list_iterate_items(seg, &lv->segments) {
 		for (s = 0; s < seg->area_count; s++) {
 			if (seg_type(seg, s) != AREA_LV)