]> sourceware.org Git - lvm2.git/commitdiff
Don't send a signal to kill threads that are idling nicely as it upsets them.
authorPatrick Caulfield <pcaulfie@redhat.com>
Tue, 9 Aug 2005 10:39:57 +0000 (10:39 +0000)
committerPatrick Caulfield <pcaulfie@redhat.com>
Tue, 9 Aug 2005 10:39:57 +0000 (10:39 +0000)
This seems to cure bz#159727 on SMP systems.

Alasdair, can you include this patch in the lvm2-cluster package please ?

daemons/clvmd/clvmd.c

index 0e2b5a4097a0eb95660b9866c43e8ffd02a38ae7..b9e2c8718a631fefe7fb457754a516f262e29177 100644 (file)
@@ -747,6 +747,7 @@ static int read_from_local_sock(struct local_client *thisfd)
 
                /* If the client went away in mid command then tidy up */
                if (thisfd->bits.localsock.in_progress) {
+                       pthread_kill(thisfd->bits.localsock.threadid, SIGUSR2);
                        pthread_mutex_lock(&thisfd->bits.localsock.mutex);
                        thisfd->bits.localsock.state = POST_COMMAND;
                        pthread_cond_signal(&thisfd->bits.localsock.cond);
@@ -763,7 +764,6 @@ static int read_from_local_sock(struct local_client *thisfd)
                        thisfd->bits.localsock.state = PRE_COMMAND;
                        pthread_cond_signal(&thisfd->bits.localsock.cond);
                        pthread_mutex_unlock(&thisfd->bits.localsock.mutex);
-                       pthread_kill(thisfd->bits.localsock.threadid, SIGUSR2);
 
                        jstat =
                            pthread_join(thisfd->bits.localsock.threadid,
This page took 0.035006 seconds and 5 git commands to generate.