Skip to contentSkip to conversation

master - pvmove: remove locked flag from error pvmove0

PATCH Zdenek Kabelac 1 participant 1 message Apr 14, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=84ff3ae703ec7d2859398f01eee726134c543723
Commit:        84ff3ae703ec7d2859398f01eee726134c543723
Parent:        45f45c9932840c4bc2d55a1d016269b3167e0450
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Apr 10 20:31:39 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Apr 14 12:52:32 2014 +0200

pvmove: remove locked flag from error pvmove0

When pvmove0 is finished, it replaces temporarily pvmove0 with error segment, however in this case, pvmove0 remains unremovable in case pvmove --abort is interrupted in this moment - since it's not a pvmove anymore and normal lvremove can't be used to remove LOCKED lv.

---
 WHATS_NEW               |    1 +
 lib/metadata/lv_manip.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index 100b1cb..e7e74ed 100644
@@ -1,5 +1,6 @@
 Version 2.02.107 - 
 ==================================
+  Remove LOCKED flag for pvmove replaced with error target.
   Return invalid command when specifying negative polling interval.
 
 Version 2.02.106 - 10th April 2014
lib/metadata/lv_manip.c +1 -1
index 18fa7e6..0d87b70 100644
@@ -873,7 +873,7 @@ int replace_lv_with_error_segment(struct logical_volume *lv)
 	 * an error segment, we should also clear any flags
 	 * that suggest it is anything other than "error".
 	 */
-	lv->status &= ~(MIRRORED|PVMOVE);
+	lv->status &= ~(MIRRORED|PVMOVE|LOCKED);
 
 	/* FIXME: Should we bug if we find a log_lv attached? */