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

Fix tracking of validity of PVs with no mdas in lvmcache.

This commit is contained in:
Alasdair Kergon 2008-06-11 11:02:05 +00:00
parent 3a30d1db20
commit 56637f2a85
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.38 -
=================================
Fix tracking of validity of PVs with no mdas in lvmcache.
Fix return values for reporting commands when run with no PVs, LVs, or VGs.
Add omitted unlock_vg() call when sigint_caught() during vg processing.
Fix wrong free_count on imported vg from pool device

View File

@ -1015,6 +1015,15 @@ int lvmcache_update_vgname_and_id(struct lvmcache_info *info,
vgid = vgname;
}
/* If PV without mdas is already in a real VG, don't make it orphan */
if (is_orphan_vg(vgname) && info->vginfo && !list_size(&info->mdas) &&
!is_orphan_vg(info->vginfo->vgname) && memlock())
return 1;
/* If moving PV from orphan to real VG, always mark it valid */
if (!is_orphan_vg(vgname))
info->status &= ~CACHE_INVALID;
if (!_lvmcache_update_vgname(info, vgname, vgid, vgstatus,
creation_host, info->fmt) ||
!_lvmcache_update_vgid(info, info->vginfo, vgid) ||