[Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c

jbrassow at sourceware.org jbrassow at sourceware.org
Tue Oct 24 21:04:32 UTC 2006


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

--- cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2006/09/08 15:53:56	1.1.2.25
+++ cluster/cmirror-kernel/src/Attic/dm-cmirror-client.c	2006/10/24 21:04:31	1.1.2.26
@@ -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;
 	}
 




More information about the Cluster-devel mailing list