[dm-devel] waiteventloop loops once more than it needs to

Benjamin Marzinski bmarzins at redhat.com
Tue Apr 19 22:24:52 UTC 2005


In waitevntloop(), you get the current event_nr, and then wait for an
event. After the event, the event_nr will always be at least one greater.
This means that waiteventloop will always run mark_failed_path() once more
than needed. This patch, against multipath-tools-0.4.4-pre15, fixes that.

-Ben
-------------- next part --------------
diff -urN multipath-tools-0.4.4-pre15/multipathd/main.c multipath-tools-waiteventloop-fix/multipathd/main.c
--- multipath-tools-0.4.4-pre15/multipathd/main.c	2005-04-19 10:04:10.000000000 -0500
+++ multipath-tools-waiteventloop-fix/multipathd/main.c	2005-04-19 15:23:05.000000000 -0500
@@ -298,7 +298,7 @@
 	dm_task_no_open_count(dmt);
 
 	dm_task_run(dmt);
-
+	waiter->event_nr++;
 	/*
 	 * upon event ...
 	 */


More information about the dm-devel mailing list