diff options
author | Petr Rockai <prockai@redhat.com> | 2013-08-21 01:30:38 +0200 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2013-08-28 14:54:33 +0200 |
commit | f5420942b53324e3854337a8510591b17904101f (patch) | |
tree | 4bb874af17e8e56dee89b985b5da8515f70ec939 | |
parent | 2773c71abe2ed89d69732fa4fbc97222aa6dd600 (diff) | |
download | lvm2-f5420942b53324e3854337a8510591b17904101f.tar.gz |
pv_label: NULL result is not always an internal error.
-rw-r--r-- | lib/metadata/pv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/metadata/pv.c b/lib/metadata/pv.c index 0288f0740..1d608f2fe 100644 --- a/lib/metadata/pv.c +++ b/lib/metadata/pv.c @@ -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); |