From: Peter Rajnoha Date: Mon, 15 Feb 2016 14:50:11 +0000 (+0100) Subject: pv: use pv->fmt to check for fake PVs, not pv->vg X-Git-Tag: v2_02_143~26 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=45be3c875f4605f4f950e8abfa12cf422526f5db;p=lvm2.git 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. --- diff --git a/lib/metadata/pv.c b/lib/metadata/pv.c index d5820b5b2..1d6804514 100644 --- a/lib/metadata/pv.c +++ b/lib/metadata/pv.c @@ -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))