]> sourceware.org Git - lvm2.git/commitdiff
Don't skip updating pvid hash when lvmcache_info struct got swapped.
authorAlasdair Kergon <agk@redhat.com>
Thu, 27 Nov 2008 18:13:50 +0000 (18:13 +0000)
committerAlasdair Kergon <agk@redhat.com>
Thu, 27 Nov 2008 18:13:50 +0000 (18:13 +0000)
WHATS_NEW
lib/cache/lvmcache.c

index f7b734a40a6f57f09f16fbc520df471c4dfed15f..459533a948bc179d29f03e0009ff1e15c63548e1 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.44 - 
 ====================================
+  Don't skip updating pvid hash when lvmcache_info struct got swapped.
   Add tinfo to termcap search path for pld-linux.
   Fix startup race in clvmd.
   Generate Red Hat clvmd startup script at configuration time with correct paths.
index 146fb93da2b80626306cca75bc204fe9173dea10..edd816d20f93176b468b9e6a38d6328ec4328ec5 100644 (file)
@@ -707,7 +707,11 @@ void lvmcache_del(struct lvmcache_info *info)
 
 static int _lvmcache_update_pvid(struct lvmcache_info *info, const char *pvid)
 {
-       if (!strcmp(info->dev->pvid, pvid))
+       /*
+        * Nothing to do if already stored with same pvid.
+        */
+       if (((dm_hash_lookup(_pvid_hash, pvid)) == info) &&
+           !strcmp(info->dev->pvid, pvid))
                return 1;
        if (*info->dev->pvid) {
                dm_hash_remove(_pvid_hash, info->dev->pvid);
This page took 0.044017 seconds and 5 git commands to generate.