Skip to contentSkip to conversation

LVM2 ./WHATS_NEW daemons/clvmd/clvmd.c

PATCH [email protected] 1 participant 1 message Dec 11, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: pcaulfield at sourceware.org 2006-12-11 13:48:41

Modified files:
. : WHATS_NEW
daemons/clvmd : clvmd.c

Log message:
Fix hang in clvmd if a pre-command failed. The pre/post thread was getting out of sync in this instance and would not quit.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.515&r2=1.516
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.32&r2=1.33

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.17 -
 ===================================
+  Fix hang in clvmd if a pre-command failed.
 
 Version 2.02.16 - 1st December 2006
 ===================================
daemons/clvmd/clvmd.c +2 -0
@@ -1426,6 +1426,8 @@
 		DEBUGLOG("Writing status %d down pipe %d\n", status, pipe_fd);
 		/* Tell the parent process we have finished this bit */
 		write(pipe_fd, &status, sizeof(int));
+		if (status)
+			continue; /* Wait for another PRE command */
 
 		/* We may need to wait for the condition variable before running the post command */
 		pthread_mutex_lock(&client->bits.localsock.mutex);