1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
lvm2/lib
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
..
activate Another one internal device layer fix... 2010-05-14 12:39:52 +00:00
cache Add lvmcache_vgname_from_pvid(). 2010-05-19 11:52:21 +00:00
commands Currently if clvmd is running and user issues vgscan, 2010-05-13 13:04:03 +00:00
config Don't ignore error if resuming any LV fails in resume_lvs. 2010-04-12 11:52:53 +00:00
datastruct Remove unnecessary / duplicate dm_list macros and functions. 2009-11-25 20:44:07 +00:00
device Suppress duplicate error messages about read failures and missing devices. 2010-05-05 22:37:52 +00:00
display Cleanup returns for void functions. 2009-12-11 13:16:37 +00:00
error Fix last check-ins: seg can be NULL. 2009-02-28 20:04:24 +00:00
filters pre-release 2010-05-17 18:39:01 +00:00
format1 Install plugins to subdirs 2010-05-06 10:07:46 +00:00
format_pool Install plugins to subdirs 2010-05-06 10:07:46 +00:00
format_text Suppress duplicate error messages about read failures and missing devices. 2010-05-05 22:37:52 +00:00
freeseg Fix reporting of LV fields alongside unallocated PV segments. 2008-06-25 16:52:27 +00:00
label Use log_error macro consistently throughout in place of log_err. 2009-07-15 20:02:46 +00:00
locking Add is_global_vg and split out from is_orphan_vg. 2010-05-19 02:36:33 +00:00
log Suppress duplicate error messages about read failures and missing devices. 2010-05-05 22:37:52 +00:00
metadata Add find_vgname_from_{pvname|pvid} functions. 2010-05-19 11:52:37 +00:00
mirror Install plugins to subdirs 2010-05-06 10:07:46 +00:00
misc Set appropriate udev flags for reserved LVs. 2010-04-23 14:16:32 +00:00
mm Better debug message for Un/Locked memory size. 2010-04-01 14:53:47 +00:00
report Use dm_report_field_int32 instead of dm_report_field_uint64 for printing '-1' 2010-02-15 20:27:33 +00:00
snapshot Install plugins to subdirs 2010-05-06 10:07:46 +00:00
striped Use macro outsize() with check for error return value. 2010-01-07 14:46:51 +00:00
unknown Fix the "const discarded" warnings introduced in the unknown segment patch. 2009-10-22 10:38:07 +00:00
uuid Use log_error macro consistently throughout in place of log_err. 2009-07-15 20:02:46 +00:00
zero Attempt to load dm-zero module if zero target needed but not present. (mbroz) 2009-05-27 13:05:53 +00:00
Makefile.in INSTALL rules updates 2010-04-09 21:42:48 +00:00