[DRBD-cvs] drbd by phil; Found and fixed the 'big' syncer bug. Th...

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Sun, 18 Jan 2004 20:43:03 +0100 (CET)


DRBD CVS committal

Author  : phil
Module  : drbd

Dir     : drbd/drbd


Modified Files:
      Tag: rel-0_7-branch
	drbd_dsender.c 


Log Message:
Found and fixed the 'big' syncer bug. The w_make_resync_request
work got queued on the SyncSource node as well. 
Now resyncing seems to work fine again. Yes!

===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_dsender.c,v
retrieving revision 1.1.2.55
retrieving revision 1.1.2.56
diff -u -3 -r1.1.2.55 -r1.1.2.56
--- drbd_dsender.c	18 Jan 2004 19:04:52 -0000	1.1.2.55
+++ drbd_dsender.c	18 Jan 2004 19:43:02 -0000	1.1.2.56
@@ -232,8 +232,10 @@
 	INFO("Syncer continues.\n");
 	_set_cstate(mdev,ns);
 
-	mdev->resync_work.cb = w_make_resync_request;
-	_drbd_queue_work(&mdev->data.work,&mdev->resync_work);
+	if(mdev->cstate == SyncTarget) {
+		mdev->resync_work.cb = w_make_resync_request;
+		_drbd_queue_work(&mdev->data.work,&mdev->resync_work);
+	}
 }