Skip to contentSkip to conversation

LVM2/daemons/lvmetad lvmetad-core.c

PATCH [email protected] 1 participant 1 message Feb 24, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2012-02-24 00:11:59

Modified files:
daemons/lvmetad: lvmetad-core.c

Log message:
Clean up the lvmetad state more thoroughly upon shutdown.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/lvmetad/lvmetad-core.c.diff?cvsroot=lvm2&r1=1.40&r2=1.41

daemons/lvmetad/lvmetad-core.c +8 -0
@@ -941,6 +941,12 @@
 		n = dm_hash_get_next(ls->vgid_to_metadata, n);
 	}
 
+	n = dm_hash_get_first(ls->pvid_to_pvmeta);
+	while (n) {
+		dm_config_destroy(dm_hash_get_data(ls->pvid_to_pvmeta, n));
+		n = dm_hash_get_next(ls->pvid_to_pvmeta, n);
+	}
+
 	n = dm_hash_get_first(ls->lock.vg);
 	while (n) {
 		pthread_mutex_destroy(dm_hash_get_data(ls->lock.vg, n));
@@ -952,6 +958,8 @@
 	dm_hash_destroy(ls->pvid_to_pvmeta);
 	dm_hash_destroy(ls->device_to_pvid);
 	dm_hash_destroy(ls->vgid_to_metadata);
+	dm_hash_destroy(ls->vgid_to_vgname);
+	dm_hash_destroy(ls->vgname_to_vgid);
 	dm_hash_destroy(ls->pvid_to_vgid);
 	return 1;
 }