[DRBD-cvs] drbd by phil; In case you did a "drbdadm down rX" of a...

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Wed, 21 Apr 2004 16:34:57 +0200 (CEST)


DRBD CVS committal

Author  : phil
Module  : drbd

Dir     : drbd/drbd


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


Log Message:
In case you did a "drbdadm down rX" of a resource that was resyncing,
the next sync-group was not resumed. 

This is fixed now.

[ I also thought if it would be a better idea to have the worker
  all the time up and running. (Currently it only runs as long as
  we have a socket). ]


===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v
retrieving revision 1.97.2.130
retrieving revision 1.97.2.131
diff -u -3 -r1.97.2.130 -r1.97.2.131
--- drbd_receiver.c	14 Apr 2004 13:05:42 -0000	1.97.2.130
+++ drbd_receiver.c	21 Apr 2004 14:34:52 -0000	1.97.2.131
@@ -1506,9 +1506,11 @@
 		}
 	}
 
+	// worker was stopped..., run w_resume_next_sg() if it is scheduled...
+	if(mdev->resync_work.cb == w_resume_next_sg) {
+		w_resume_next_sg(mdev,&mdev->resync_work,0);
+	}
 	INFO("receiver exiting\n");
-
-	/* set_cstate(mdev,StandAlone); */
 
 	return 0;
 }