From mboxrd@z Thu Jan 1 00:00:00 1970 From: jbrassow@sourceware.org Date: 28 Nov 2007 20:34:24 -0000 Subject: [Cluster-devel] cluster/cmirror/src functions.c Message-ID: <20071128203424.23254.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: RHEL5 Changes by: jbrassow at sourceware.org 2007-11-28 20:34:22 Modified files: cmirror/src : functions.c Log message: - Bug 387601 - If the sync bit is already set, do not increment the sync_count. This can lead to a sync_count > the number of regions. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/functions.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.4&r2=1.1.2.5 --- cluster/cmirror/src/Attic/functions.c 2007/11/08 22:16:53 1.1.2.4 +++ cluster/cmirror/src/Attic/functions.c 2007/11/28 20:34:22 1.1.2.5 @@ -1147,8 +1147,13 @@ lc->recovering_region = (uint64_t)-1; if (pkg->in_sync) { - log_set_bit(lc, lc->sync_bits, pkg->region); - lc->sync_count++; + if (log_test_bit(lc->sync_bits, pkg->region)) { + LOG_PRINT(" Region already in-sync: %llu", + pkg->region); + } else { + log_set_bit(lc, lc->sync_bits, pkg->region); + lc->sync_count++; + } } else if (log_test_bit(lc->sync_bits, pkg->region)) { lc->sync_count--; log_clear_bit(lc, lc->sync_bits, pkg->region);