Skip to contentSkip to conversation

waiteventloop loops once more than it needs to

PATCH Benjamin Marzinski 2 participants 2 messages Apr 19, 2005 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

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

multipathd/main.c +1 -1
diff -urN multipath-tools-0.4.4-pre15/multipathd/main.c multipath-tools-waiteventloop-fix/multipathd/main.c
@@ -298,7 +298,7 @@
 	dm_task_no_open_count(dmt);
 
 	dm_task_run(dmt);
-
+	waiter->event_nr++;
 	/*
 	 * upon event ...
 	 */
#1 lore raw

Right, applied.

Quoted 10 lines · Benjamin Marzinski

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
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Signature · 1 line
christophe varoqui <[email protected]>