1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

pv_label: NULL result is not always an internal error.

This commit is contained in:
Petr Rockai 2013-08-21 01:30:38 +02:00
parent a8aa8d4b5c
commit 67c563ac2b

View File

@ -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);