[DRBD-cvs] svn commit by phil - r2418 - trunk/drbd - This was a blunt bug. It could cause a crash somewhere

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Wed Sep 13 20:57:55 CEST 2006


Author: phil
Date: 2006-09-13 20:57:54 +0200 (Wed, 13 Sep 2006)
New Revision: 2418

Modified:
   trunk/drbd/drbd_receiver.c
Log:
This was a blunt bug. It could cause a crash somewhere else
where we assumed that it is legal to look at mdev->bc after
inc_local(). But by promoting from Attaching to UpTpDate...



Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-09-13 16:35:59 UTC (rev 2417)
+++ trunk/drbd/drbd_receiver.c	2006-09-13 18:57:54 UTC (rev 2418)
@@ -2155,7 +2155,7 @@
 	ns.peer = peer_state.role;
 	ns.pdsk = peer_state.disk;
 	ns.peer_isp = ( peer_state.aftr_isp | peer_state.user_isp );
-	if(nconn == Connected && ns.disk == Attaching) ns.disk = UpToDate;
+	if(nconn == Connected && ns.disk == Consistent) ns.disk = 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