[DRBD-cvs] svn commit by phil - r2901 - branches/drbd-8.0/drbd - Simon identified this: We need to make sure to have a c

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue May 22 15:04:32 CEST 2007


Author: phil
Date: 2007-05-22 15:04:31 +0200 (Tue, 22 May 2007)
New Revision: 2901

Modified:
   branches/drbd-8.0/drbd/drbd_main.c
Log:
Simon identified this:
  We need to make sure to have a connection in these cases.
  


Modified: branches/drbd-8.0/drbd/drbd_main.c
===================================================================
--- branches/drbd-8.0/drbd/drbd_main.c	2007-05-22 12:59:53 UTC (rev 2900)
+++ branches/drbd-8.0/drbd/drbd_main.c	2007-05-22 13:04:31 UTC (rev 2901)
@@ -935,15 +935,17 @@
 	}
 
 	/* Last part of the attaching process ... */
-	if ( os.disk == Attaching && ns.disk == Negotiating ) {
+	if ( ns.conn >= Connected && 
+	     os.disk == Attaching && ns.disk == Negotiating ) {
 		drbd_send_sizes(mdev);  // to start sync...
 		drbd_send_uuids(mdev);
 		drbd_send_state(mdev);
 	}
 
 	/* We want to pause/continue resync, tell peer. */
-	if (  ( os.aftr_isp != ns.aftr_isp ) ||
-	      ( os.user_isp != ns.user_isp ) ) {
+	if ( ns.conn >= Connected && 
+	     (( os.aftr_isp != ns.aftr_isp ) ||
+	      ( os.user_isp != ns.user_isp )) ) {
 		drbd_send_state(mdev);
 	}
 



More information about the drbd-cvs mailing list