LVM2 ./WHATS_NEW lib/metadata/metadata-exporte ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2010-03-16 15:30:49
Modified files:
. : WHATS_NEW lib/metadata : metadata-exported.h metadata.c tools : pvcreate.c reporter.c
Log message:
Look up missing PVs by uuid not dev_name in _pvs_single to avoid invalid stat. Make find_pv_in_vg_by_uuid() return same type as related functions.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1461&r2=1.1462
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.134&r2=1.135
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.319&r2=1.320
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvcreate.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/reporter.c.diff?cvsroot=lvm2&r1=1.58&r2=1.59
WHATS_NEW +2 -0
@@ -1,5 +1,7 @@ Version 2.02.63 - ================================ + Look up missing PVs by uuid not dev_name in _pvs_single to avoid invalid stat. + Make find_pv_in_vg_by_uuid() return same type as related functions. Introduce is_missing_pv(). Fix clvmd Makefile to not overwrite LIBS from template definition.
lib/metadata/metadata-exported.h +2 -2
@@ -597,8 +597,8 @@/* Find a PV within a given VG */ struct pv_list *find_pv_in_vg (const struct volume_group *vg,const char *pv_name); -struct physical_volume *find_pv_in_vg_by_uuid (const struct volume_group *vg, -const struct id *id); +struct pv_list *find_pv_in_vg_by_uuid (const struct volume_group *vg, +const struct id *id);/* Find an LV within a given VG */ struct lv_list *find_lv_in_vg(const struct volume_group *vg,
lib/metadata/metadata.c +15 -19
@@ -52,9 +52,6 @@static struct pv_list *_find_pv_in_vg (const struct volume_group *vg,const char *pv_name); -static struct physical_volume *_find_pv_in_vg_by_uuid (const struct volume_group *vg, -const struct id *id); -static uint32_t _vg_bad_status_bits (const struct volume_group *vg,uint64_t status);
@@ -1656,37 +1653,36 @@return 0 ; } +static struct pv_list *_find_pv_in_vg_by_uuid (const struct volume_group *vg, +const struct id *id) +{ +struct pv_list *pvl; + + dm_list_iterate_items(pvl, &vg->pvs) +if (id_equal (&pvl->pv->id, id)) +return pvl; + +return NULL ; +} +/** * find_pv_in_vg_by_uuid - Find PV in VG by PV UUID * @vg: volume group to search * @id: UUID of the PV to match * * Returns: -* PV handle - if UUID of PV found in VG +* struct pv_list within owning struct volume_group - if UUID of PV found in VG * NULL - invalid parameter or UUID of PV not found in VG * * Note * FIXME - liblvm todo - make into function that takes VG handle */ -struct physical_volume *find_pv_in_vg_by_uuid (const struct volume_group *vg, -const struct id *id) +struct pv_list *find_pv_in_vg_by_uuid (const struct volume_group *vg, +const struct id *id) {return _find_pv_in_vg_by_uuid (vg, id); } - -static struct physical_volume *_find_pv_in_vg_by_uuid (const struct volume_group *vg, -const struct id *id) -{ -struct pv_list *pvl; - - dm_list_iterate_items(pvl, &vg->pvs) -if (id_equal (&pvl->pv->id, id)) -return pvl->pv; - -return NULL ; -} -struct lv_list *find_lv_in_vg (const struct volume_group *vg,const char *lv_name) {
tools/pvcreate.c +1 -1
@@ -56,7 +56,7 @@ pp->restorefile);return 0 ; } -if (!(existing_pv =find_pv_in_vg_by_uuid (vg, pp->idp))) { +if (!(existing_pv =find_pv_in_vg_by_uuid (vg, pp->idp)->pv)) {log_error ("Can't find uuid %s in backup file %s" , uuid, pp->restorefile);return 0 ;
tools/reporter.c +33 -20
84 lines not on this page · raw message