From mboxrd@z Thu Jan 1 00:00:00 1970 From: jbrassow@sourceware.org Date: 24 Oct 2006 21:04:32 -0000 Subject: [Cluster-devel] cluster/cmirror-kernel/src dm-cmirror-client.c Message-ID: <20061024210432.16776.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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; }