LVM2/daemons/lvmetad lvmetad-core.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at 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.
daemons/lvmetad/lvmetad-core.c +2 -3
@@ -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);