CVSROOT:        /cvs/cluster
Module name:    cluster
Branch:         RHEL5
Changes by:     [EMAIL PROTECTED]       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);

Reply via email to