]> sourceware.org Git - lvm2.git/commit
Add pv->vg to solidify link between a pv and a vg.
authorDave Wysochanski <dwysocha@redhat.com>
Tue, 13 Apr 2010 17:26:36 +0000 (17:26 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Tue, 13 Apr 2010 17:26:36 +0000 (17:26 +0000)
commit5d7fd713732c7225fc030726bc7477d844c6ce7b
tree2194caf065a5367e406ff0e4b37de2f58e36a68f
parentefe3e72ed04d3cb1a21173d4315821b2dc7eb04a
Add pv->vg to solidify link between a pv and a vg.

lvm2app needs a link back to the vg in order to use the vg handle for
memory allocations as well as other things.  This patch adds the field
to struct physical_volume, and sets pv->vg when reading a vg from disk or
extending a vg by using the helper function previously added,
add_pvl_to_vgs().  Moves and renames are handled with separate code
inside move_pv() and vgmerge().  Add pv->vg check to vg_validate().

A NULL value in pv->vg signifies membership in the orphan VG.
Note though in the case of pv_read() on a device with metadatacopies == 0,
more devices may need to be read for an authoritative answer.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
lib/metadata/metadata-exported.h
lib/metadata/metadata.c
This page took 0.027449 seconds and 5 git commands to generate.