From e2675481f037177f8c0c66bb811fb083b4c45837 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 27 Nov 2008 18:13:50 +0000 Subject: [PATCH] Don't skip updating pvid hash when lvmcache_info struct got swapped. --- WHATS_NEW | 1 + lib/cache/lvmcache.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index f7b734a40..459533a94 100644 --- 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. diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 146fb93da..edd816d20 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -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);