[dm-devel] [PATCH 2/5] multipath-tools: Log all messages

Benjamin Marzinski bmarzins at redhat.com
Mon Aug 3 22:00:03 UTC 2009


When the log thread pulls the last message off the buffer, it sets
la->empty.  However, then it returns la->empty, which means that the log is
empty, instead of 0, which means that it found a message.  This means that
multipathd is not logging the last message in the buffer when the log threa
runs. This patch changes the return code, so that multipathd logs all the
messages in the buffer.

Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
---
 libmultipath/log.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: multipath-tools/libmultipath/log.c
===================================================================
--- multipath-tools.orig/libmultipath/log.c
+++ multipath-tools/libmultipath/log.c
@@ -181,7 +181,7 @@ int log_dequeue (void * buff)
 
 	memset((void *)src, 0,  len);
 
-	return la->empty;
+	return 0;
 }
 
 /*




More information about the dm-devel mailing list