]> sourceware.org Git - lvm2.git/commitdiff
pv: use pv->fmt to check for fake PVs, not pv->vg
authorPeter Rajnoha <prajnoha@redhat.com>
Mon, 15 Feb 2016 14:50:11 +0000 (15:50 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Mon, 15 Feb 2016 14:52:13 +0000 (15:52 +0100)
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

index d5820b5b2fc414d953993edcea19d763596499cd..1d68045146819d6785759777c161330c2817d5a6 100644 (file)
@@ -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))
This page took 0.039381 seconds and 5 git commands to generate.