[DRBD-cvs] svn commit by simon - r2429 - trunk/drbd - If we attach a disk to a connected device pair, and no

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Mon Sep 18 14:11:46 CEST 2006


Author: simon
Date: 2006-09-18 14:11:46 +0200 (Mon, 18 Sep 2006)
New Revision: 2429

Modified:
   trunk/drbd/drbd_receiver.c
Log:
If we attach a disk to a connected device pair, and no resync
is going to happen we should update to disk state from Negotiating
to UpToDate...


Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-09-18 11:58:41 UTC (rev 2428)
+++ trunk/drbd/drbd_receiver.c	2006-09-18 12:11:46 UTC (rev 2429)
@@ -2166,6 +2166,10 @@
 			drbd_send_uuids(mdev);
 			drbd_send_state(mdev);
 		}
+		else if (nconn == Connected && peer_state.disk == Negotiating) {
+			// peer is waiting for us to respond...
+			drbd_send_state(mdev);
+		}
 	}
 
 	spin_lock_irq(&mdev->req_lock);
@@ -2176,6 +2180,7 @@
 	ns.pdsk = peer_state.disk;
 	ns.peer_isp = ( peer_state.aftr_isp | peer_state.user_isp );
 	if(nconn == Connected && ns.disk == Negotiating ) ns.disk = UpToDate;
+	if(nconn == Connected && ns.pdsk == Negotiating ) ns.pdsk = UpToDate;
 	rv = _drbd_set_state(mdev,ns,ChgStateVerbose | ChgStateHard);
 	spin_unlock_irq(&mdev->req_lock);
 	if (rv==SS_Success) {



More information about the drbd-cvs mailing list