[lvm-devel] master - locking: pvmove is locking holding LV

Zdenek Kabelac zkabelac at sourceware.org
Fri Nov 24 15:10:51 UTC 2017


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b5be7420d947b9bfe52da73078955ed241765875
Commit:        b5be7420d947b9bfe52da73078955ed241765875
Parent:        8cf10948bd3acce7ae03f16982f0acbc4cde4fee
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Fri Nov 24 13:55:57 2017 +0100
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Fri Nov 24 16:05:21 2017 +0100

locking: pvmove is locking holding LV

As we do get lock for pvmove LV - it's lockholder ATM.
---
 WHATS_NEW         |    1 +
 lib/metadata/lv.c |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index 6ff4ccd..f29a498 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.177 -
 ====================================
+  Make a pvmove LV locking holder.
   Do not change critical section counter on resume path without real resume.
   Enhance activation code to automatically suspend pvmove participants.
   Remove unnecessary single read from lvmdiskscan.
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index 4d35efe..630880f 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -1604,6 +1604,9 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv)
 	if ((lv_is_raid_image(lv) || lv_is_raid_metadata(lv)) && lv_is_visible(lv))
 		return lv;
 
+	if (lv_is_pvmove(lv))
+		return lv;
+
 	/* For other types, by default look for the first user */
 	dm_list_iterate_items(sl, &lv->segs_using_this_lv) {
 		/* FIXME: complete this exception list */




More information about the lvm-devel mailing list