[DRBD-cvs] drbd by phil; As soon as the resync of a devices finis...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Fri, 26 Mar 2004 10:07:46 +0100 (CET)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_dsender.c
Log Message:
As soon as the resync of a devices finished, sync of all devices
in the next group was started. [=buggy]
-> Now:
As soon as the resync of all devices in a sync group is finished,
resync of all devices in the next group is startd. [=correct]
-Philipp
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_dsender.c,v
retrieving revision 1.1.2.88
retrieving revision 1.1.2.89
diff -u -3 -r1.1.2.88 -r1.1.2.89
--- drbd_dsender.c 24 Mar 2004 13:14:06 -0000 1.1.2.88
+++ drbd_dsender.c 26 Mar 2004 09:07:41 -0000 1.1.2.89
@@ -674,6 +674,16 @@
drbd_global_lock();
+ for (i=0; i < minor_count; i++) {
+ odev = drbd_conf + i;
+ if ( odev->sync_conf.group == mdev->sync_conf.group
+ && ( odev->cstate == SyncSource ||
+ odev->cstate == SyncTarget ) ) {
+ goto out; // Sync on an other device in this group
+ // still runs.
+ }
+ }
+
for (i=0; i < minor_count; i++) { // find next sync group
odev = drbd_conf + i;
if ( odev->sync_conf.group > mdev->sync_conf.group
@@ -691,6 +701,7 @@
}
}
+ out:
drbd_global_unlock();
w->cb = w_resync_inactive;