cluster/cmirror-kernel/src dm-cmirror-client.c
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.
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 ; }