Skip to contentSkip to conversation

LVM2 ./WHATS_NEW daemons/cmirrord/cluster.c

PATCH [email protected] 1 participant 1 message Jan 27, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow at sourceware.org 2010-01-27 22:28:06

Modified files:
. : WHATS_NEW
daemons/cmirrord: cluster.c

Log message:
Was using dm_list_iterate_items when I should have been using *_safe. This had the effect of segfaulting the log daemon when converting a mirror from one log type to another.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1412&r2=1.1413
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/cluster.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.60 - 23rd January 2010
 ===================================
+  Fix lvconvert issue with cluster mirrors due to un'_safe' list processing
   Fix pvmove abort workaround to be cluster-aware when temporary mirror activation fails.
   Always query device by using uuid only and not name in clvmd.
   Add missing metadata reverts in pvmove error path.
daemons/cmirrord/cluster.c +2 -2
@@ -858,9 +858,9 @@
 static int do_cluster_work(void *data __attribute((unused)))
 {
 	int r = SA_AIS_OK;
-	struct clog_cpg *entry;
+	struct clog_cpg *entry, *tmp;
 
-	dm_list_iterate_items(entry, &clog_cpg_list) {
+	dm_list_iterate_items_safe(entry, tmp, &clog_cpg_list) {
 		r = cpg_dispatch(entry->handle, CPG_DISPATCH_ALL);
 		if (r != SA_AIS_OK)
 			LOG_ERROR("cpg_dispatch failed: %s", str_ais_error(r));