1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Fallback to full rescan for missing device

Fix bug when NULL could have been passsed as 'data'
to _add_pv_to_list() if 'dev' is NULL.

Now it fallbacks to complete scan.
This commit is contained in:
Zdenek Kabelac 2010-12-01 10:33:55 +00:00
parent c8c4eda71f
commit 2937b51eaa
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.78 -
====================================
Do a full rescan if some device is missing in read_pvs_in_vg().
Avoid misleading warnings in vgextend --restoremissing in certain cases.
Add error path stack traces for _process_mapper_dir(), _create_and_load_v4().
Add missing test for failed pool allocation in write_config_node().

View File

@ -471,7 +471,7 @@ int read_pvs_in_vg(const struct format_type *fmt, const char *vg_name,
vginfo->infos.n) {
dm_list_iterate_items(info, &vginfo->infos) {
dev = info->dev;
if (dev && !(data = read_disk(fmt, dev, mem, vg_name)))
if (!dev || !(data = read_disk(fmt, dev, mem, vg_name)))
break;
_add_pv_to_list(head, data);
}