Skip to contentSkip to conversation

master - pv: use pv->fmt to check for fake PVs, not pv->vg

PATCH Peter Rajnoha 1 participant 1 message Feb 15, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=45be3c875f4605f4f950e8abfa12cf422526f5db
Commit:        45be3c875f4605f4f950e8abfa12cf422526f5db
Parent:        099d99975c25ba4f4c0593b778c95e7e185fd527
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Mon Feb 15 15:50:11 2016 +0100
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Mon Feb 15 15:52:13 2016 +0100

pv: use pv->fmt to check for fake PVs, not pv->vg

pv->vg is not set yet during pvcreate processing. Use pv->fmt instead to check for these fake PVs (all normal PVs have format defined, devices which are not PVs don't have this set).

This fixes commit 0000db7f98a07aa31c5b1cf13938b612e7f2821b.

---
 lib/metadata/pv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/metadata/pv.c +1 -1
index d5820b5..1d68045 100644
@@ -213,7 +213,7 @@ int is_used_pv(const struct physical_volume *pv)
 	struct lvmcache_info *info;
 	uint32_t ext_flags;
 
-	if (!pv->vg)
+	if (!pv->fmt)
 		return 0;
 
 	if (!is_orphan(pv))