mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
Check result of vginfo_from_vgname
Check for some potential internal error.
This commit is contained in:
parent
1d2f212a3d
commit
e3552d738c
@ -1,5 +1,6 @@
|
||||
Version 2.02.78 -
|
||||
====================================
|
||||
Add test for existance of orphan vginfo in _lvmcache_update_vgname().
|
||||
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().
|
||||
|
7
lib/cache/lvmcache.c
vendored
7
lib/cache/lvmcache.c
vendored
@ -1083,6 +1083,13 @@ static int _lvmcache_update_vgname(struct lvmcache_info *info,
|
||||
_scanning_in_progress && _vginfo_is_invalid(primary_vginfo))
|
||||
dm_list_iterate_items_safe(info2, info3, &primary_vginfo->infos) {
|
||||
orphan_vginfo = vginfo_from_vgname(primary_vginfo->fmt->orphan_vg_name, NULL);
|
||||
if (!orphan_vginfo) {
|
||||
log_error(INTERNAL_ERROR "Orphan vginfo %s lost from cache.",
|
||||
primary_vginfo->fmt->orphan_vg_name);
|
||||
dm_free(vginfo->vgname);
|
||||
dm_free(vginfo);
|
||||
return 0;
|
||||
}
|
||||
_drop_vginfo(info2, primary_vginfo);
|
||||
_vginfo_attach_info(orphan_vginfo, info2);
|
||||
if (info2->mdas.n)
|
||||
|
Loading…
x
Reference in New Issue
Block a user