1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

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 0000db7f98.
This commit is contained in:
Peter Rajnoha 2016-02-15 15:50:11 +01:00
parent 099d99975c
commit 45be3c875f

View File

@ -213,7 +213,7 @@ int is_used_pv(const struct physical_volume *pv)
struct lvmcache_info *info; struct lvmcache_info *info;
uint32_t ext_flags; uint32_t ext_flags;
if (!pv->vg) if (!pv->fmt)
return 0; return 0;
if (!is_orphan(pv)) if (!is_orphan(pv))