]> sourceware.org Git - lvm2.git/commitdiff
Fix tracking of validity of PVs with no mdas in lvmcache.
authorAlasdair Kergon <agk@redhat.com>
Wed, 11 Jun 2008 11:02:05 +0000 (11:02 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 11 Jun 2008 11:02:05 +0000 (11:02 +0000)
WHATS_NEW
lib/cache/lvmcache.c

index e1bbadc2ea033deb468c5958ddc31d8996515fe1..1a70a1c91dbbfa69c59d4806b785bf910bc91e18 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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
index d232f6772e9e1dd4f4832032bac079bf355eaf4b..a25ccde41c2a4495b5bbd925e662e3871f945e45 100644 (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) ||
This page took 0.041485 seconds and 5 git commands to generate.