dev-dct-process-part3 - pv_label: NULL result is not always an internal error.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=53516ea789b8b8f71ac84468f38ce9a0c40f9649 Commit: 53516ea789b8b8f71ac84468f38ce9a0c40f9649 Parent: 940aeee4e7e86f4f389dd20cdd82826c7eeb470c Author: Petr Rockai <[email protected]> AuthorDate: Wed Aug 21 01:30:38 2013 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Wed Aug 21 01:30:38 2013 +0200
pv_label: NULL result is not always an internal error.
--- lib/metadata/pv.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
lib/metadata/pv.c +4 -1
@@ -355,7 +355,10 @@ struct label *pv_label(const struct physical_volume *pv)struct lvmcache_info *info =lvmcache_info_from_pvid ((const char *)&pv->id.uuid,0 );if (!info) { -log_error (INTERNAL_ERROR "PV %s unexpectedly not in cache." ,dev_name (pv->dev)); +if (pv->vg)/* process_each_pv will create PVs that are dummy +* and that have no label associated */ +log_error (INTERNAL_ERROR "PV %s unexpectedly not in cache." , +dev_name (pv->dev));return NULL ; }return lvmcache_get_label (info);