diff --git a/WHATS_NEW b/WHATS_NEW index 7a00f7f3c..581c5ab2d 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.44 - ==================================== + Fix startup race in clvmd. Generate Red Hat clvmd startup script at configuration time with correct paths. Fix clvmd & dmeventd builds after tree restructuring. Cope with snapshot dependencies when removing a whole VG with lvremove. diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index eb34eaf97..93a0cb7fa 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -423,6 +423,9 @@ int main(int argc, char *argv[]) /* This needs to be started after cluster initialisation as it may need to take out locks */ DEBUGLOG("starting LVM thread\n"); + + /* Don't let anyone else to do work until we are started */ + pthread_mutex_lock(&lvm_start_mutex); pthread_create(&lvm_thread, NULL, lvm_thread_fn, (void *)(long)using_gulm); @@ -1758,9 +1761,6 @@ static __attribute__ ((noreturn)) void *lvm_thread_fn(void *arg) sigset_t ss; int using_gulm = (int)(long)arg; - /* Don't let anyone else to do work until we are started */ - pthread_mutex_lock(&lvm_start_mutex); - DEBUGLOG("LVM thread function started\n"); /* Ignore SIGUSR1 & 2 */