Skip to contentSkip to conversation

cluster/cmirror-kernel/src dm-cmirror-client.c

Cluster-devel [email protected] 1 participant 1 message Oct 24, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: jbrassow at sourceware.org 2006-10-24 21:04:31

Modified files:
cmirror-kernel/src: dm-cmirror-client.c

Log message:
- Bug 194131 - cluster mirror copy status can give false (0.00) percent

An error during communication can lead to a false reporting of 0% in-sync regions. This can't be completely eliminated until rhel5, but we can at least retry a couple times in rhel4.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror-kernel/src/dm-cmirror-client.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.25&r2=1.1.2.26

cmirror-kernel/src/Attic/dm-cmirror-client.c +4 -1
@@ -1040,6 +1040,7 @@
 
 static region_t cluster_get_sync_count(struct dirty_log *log)
 {
+	int i;
 	region_t rtn;
 	struct log_c *lc = (struct log_c *) log->context;
 /* take out optimization
@@ -1047,7 +1048,9 @@
 		return lc->region_count;
 	}
 */
-	if(consult_server(lc, 0, LRT_GET_SYNC_COUNT, &rtn)){
+	/* Try to get sync count up to five times */
+	for (i = 0; i < 5 && consult_server(lc, 0, LRT_GET_SYNC_COUNT, &rtn); i++);
+	if(i >= 5){
 		return 0;
 	}