From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8346 invoked by alias); 20 Jul 2011 21:26:18 -0000 Received: (qmail 8329 invoked by uid 9699); 20 Jul 2011 21:26:18 -0000 Date: Wed, 20 Jul 2011 21:26:00 -0000 Message-ID: <20110720212618.8327.qmail@sourceware.org> From: mornfall@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/daemons/lvmetad lvmetad-core.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00053.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-07-20 21:26:18 Modified files: daemons/lvmetad: lvmetad-core.c Log message: lvmetad: Robustify update_pv_status and remove an useless lookup. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/lvmetad/lvmetad-core.c.diff?cvsroot=lvm2&r1=1.16&r2=1.17 --- LVM2/daemons/lvmetad/lvmetad-core.c 2011/07/20 21:23:43 1.16 +++ LVM2/daemons/lvmetad/lvmetad-core.c 2011/07/20 21:26:18 1.17 @@ -149,9 +149,8 @@ lock_pvs(s); struct config_node *pv = pvs(vg); while (pv) { - const char *uuid = find_config_str(pv->child, "id", "N/A"); - const char *vgid = find_config_str(vg->root, "metadata/id", "N/A"); - int found = dm_hash_lookup(s->pvs, uuid) ? 1 : 0; + const char *uuid = find_config_str(pv->child, "id", NULL); + int found = uuid ? (dm_hash_lookup(s->pvs, uuid) ? 1 : 0) : 0; // TODO: avoid the override here if MISSING came from the actual // metadata, as opposed from our manipulation... set_flag(vg, pv, "status", "MISSING", !found);