diff options
Diffstat (limited to 'daemons/clvmd/clvmd-cman.c')
-rw-r--r-- | daemons/clvmd/clvmd-cman.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/daemons/clvmd/clvmd-cman.c b/daemons/clvmd/clvmd-cman.c index 52da2ac..7e76dc4 100644 --- a/daemons/clvmd/clvmd-cman.c +++ b/daemons/clvmd/clvmd-cman.c @@ -89,16 +89,17 @@ static int _init_cluster(void) DEBUGLOG("CMAN initialisation complete\n"); /* Create a lockspace for LV & VG locks to live in */ - lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600); + lockspace = dlm_open_lockspace(LOCKSPACE_NAME); if (!lockspace) { - if (errno == EEXIST) { - lockspace = dlm_open_lockspace(LOCKSPACE_NAME); - } + lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600); if (!lockspace) { - syslog(LOG_ERR, "Unable to create lockspace for CLVM: %m"); + syslog(LOG_ERR, "Unable to create DLM lockspace for CLVM: %m"); return -1; } - } + DEBUGLOG("Created DLM lockspace for CLVMD.\n"); + } else + DEBUGLOG("Opened existing DLM lockspace for CLVMD.\n"); + dlm_ls_pthread_init(lockspace); DEBUGLOG("DLM initialisation complete\n"); return 0; @@ -478,6 +479,7 @@ static int _get_cluster_name(char *buf, int buflen) } static struct cluster_ops _cluster_cman_ops = { + .name = "cman", .cluster_init_completed = _cluster_init_completed, .cluster_send_message = _cluster_send_message, .name_from_csid = _name_from_csid, |