diff --git a/WHATS_NEW b/WHATS_NEW index 1c0ef6d90..cbe6c059d 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.169 - ===================================== + Avoid parallel usage of cpg_mcast_joined() in clvmd with corosync. Support raid6_{ls,rs,la,ra}_6 segment types and conversions from/to it. Support raid6_n_6 segment type and conversions from/to it. Support raid5_n segment type and conversions from/to it. diff --git a/daemons/clvmd/clvmd-corosync.c b/daemons/clvmd/clvmd-corosync.c index 05c9882f6..2227cbf0a 100644 --- a/daemons/clvmd/clvmd-corosync.c +++ b/daemons/clvmd/clvmd-corosync.c @@ -532,6 +532,7 @@ static int _cluster_fd_callback(struct local_client *fd, char *buf, int len, static int _cluster_send_message(const void *buf, int msglen, const char *csid, const char *errtext) { + static pthread_mutex_t _mutex = PTHREAD_MUTEX_INITIALIZER; struct iovec iov[2]; cs_error_t err; int target_node; @@ -546,7 +547,10 @@ static int _cluster_send_message(const void *buf, int msglen, const char *csid, iov[1].iov_base = (char *)buf; iov[1].iov_len = msglen; + pthread_mutex_lock(&_mutex); err = cpg_mcast_joined(cpg_handle, CPG_TYPE_AGREED, iov, 2); + pthread_mutex_unlock(&_mutex); + return cs_to_errno(err); }