summaryrefslogtreecommitdiffstats
path: root/daemons
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2012-02-24 00:11:59 +0000
committerPetr Rockai <prockai@redhat.com>2012-02-24 00:11:59 +0000
commit2a11eea2e153366feb8fefb9a49f4cd3a395d15c (patch)
tree2ce3f6f0641334dcc7a5d5fc22e1191029fd16f5 /daemons
parentdc5ba5c392f87b367695003864c8d837a4dc07cb (diff)
downloadlvm2-2a11eea2e153366feb8fefb9a49f4cd3a395d15c.tar.gz
lvm2-2a11eea2e153366feb8fefb9a49f4cd3a395d15c.tar.xz
lvm2-2a11eea2e153366feb8fefb9a49f4cd3a395d15c.zip
Clean up the lvmetad state more thoroughly upon shutdown.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/lvmetad/lvmetad-core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index edef7b06..8795263e 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -941,6 +941,12 @@ static int fini(daemon_state *s)
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 @@ static int fini(daemon_state *s)
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;
}