diff --git a/WHATS_NEW b/WHATS_NEW index c3dcd819e..c273a92af 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.29 - ================================== + Stop clvmd going haywire if a pre_function fails. Convert some vg_reads into vg_lock_and_reads. Avoid nested vg_reads when processing PVs in VGs and fix associated locking. Accept sizes with --readahead argument. diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index deafecbdb..678ee4889 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -1379,8 +1379,10 @@ static __attribute__ ((noreturn)) void *pre_and_post_thread(void *arg) break; } while(1); - if (status) - continue; /* Wait for another PRE command */ + if (status) { + client->bits.localsock.state = POST_COMMAND; + goto next_pre; + } /* We may need to wait for the condition variable before running the post command */ pthread_mutex_lock(&client->bits.localsock.mutex); @@ -1409,7 +1411,7 @@ static __attribute__ ((noreturn)) void *pre_and_post_thread(void *arg) log_error("Error sending to pipe: %m\n"); break; } while(1); - +next_pre: DEBUGLOG("Waiting for next pre command\n"); pthread_mutex_lock(&client->bits.localsock.mutex);