1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Dave Wysochanski dd2a0e940d Add find_vgname_from_{pvname|pvid} functions.
Some commands start with a pvname, but we'd like to force users to
start with a vg handle to obtain a pv handle.  Our best option seems
to be providing a way to look up the vgname from the pvname, and then
require them to use vg_read/vg_open.

In addition to the pvname lookup function, this patch also provides a
lookup by pvid.  The lookup by pvid can be used in conjunction with
lvmcache_get_pvids to process all pvs in the system.

The pvid find function first calls lvmcache_vgname_from_pvid, which may
cause the label to be read if it is not in the cache.  If the vgname is
returned is an orphan, we then check to see if there are metadata areas,
and if not, we scan every PV on the system by calling scan_vgs_for_pvs().
In most cases we should not need to do this, and by using the info->mdas
count, we avoid calling pv_read() as prior code did.  So this patch is a
bit cleaner and should allow us to refactor more of the pv code.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-05-19 11:52:37 +00:00
..
lv_alloc.h Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
lv_manip.c Disallow the direct removal of a merging snapshot. 2010-04-23 19:27:10 +00:00
merge.c Permit mimage LVs to be striped in lvcreate and lvresize. 2010-04-09 01:00:10 +00:00
metadata-exported.h Add find_vgname_from_{pvname|pvid} functions. 2010-05-19 11:52:37 +00:00
metadata.c Add find_vgname_from_{pvname|pvid} functions. 2010-05-19 11:52:37 +00:00
metadata.h Add del_pvl_from_vgs() and move prototypes into metadata-exported.h 2010-04-13 17:25:44 +00:00
mirror.c Disallow toggling the cluster attribute of a volume group if there 2010-05-14 15:19:42 +00:00
pv_alloc.h Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_manip.c Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_map.c Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
pv_map.h Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
segtype.c Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
segtype.h Improve target type compatibility checking in _percent_run(). 2010-01-15 16:35:26 +00:00
snapshot_manip.c When removing a snapshot avoid preloading the origin if the 2010-04-23 02:57:39 +00:00