1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

cleanup: clvmd move destroy_lvhash into main

Keep destruction code path consistent and simple and
destroy lvhash in the place it's been created.
Also issue debug message from a single place.
This commit is contained in:
Zdenek Kabelac 2014-03-20 14:06:16 +01:00
parent 1ee8688de0
commit bf19c6be2c
5 changed files with 2 additions and 9 deletions

View File

@ -245,7 +245,6 @@ static void _add_up_node(const char *csid)
static void _cluster_closedown()
{
destroy_lvhash();
dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
cman_finish(c_handle);
}

View File

@ -345,9 +345,6 @@ static int _init_cluster(void)
static void _cluster_closedown(void)
{
DEBUGLOG("cluster_closedown\n");
destroy_lvhash();
dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
cpg_finalize(cpg_handle);
quorum_finalize(quorum_handle);

View File

@ -365,9 +365,6 @@ static int _init_cluster(void)
static void _cluster_closedown(void)
{
DEBUGLOG("cluster_closedown\n");
destroy_lvhash();
saLckFinalize(lck_handle);
cpg_finalize(cpg_handle);
}

View File

@ -121,8 +121,6 @@ static void _cluster_closedown(void)
{
close_comms();
DEBUGLOG("cluster_closedown\n");
destroy_lvhash();
/* If there is any awaited resource, kill it softly */
pthread_mutex_lock(&_lock_mutex);
dm_hash_destroy(_locks);

View File

@ -636,6 +636,8 @@ int main(int argc, char *argv[])
dm_free(delfd);
}
DEBUGLOG("cluster_closedown\n");
destroy_lvhash();
clops->cluster_closedown();
ret = 0;