[DRBD-cvs] svn commit by phil - r2596 - in trunk: . drbd - Allow a live attach on a primary node. Since we have th

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Wed Nov 15 20:19:19 CET 2006


Author: phil
Date: 2006-11-15 20:19:18 +0100 (Wed, 15 Nov 2006)
New Revision: 2596

Modified:
   trunk/Makefile
   trunk/drbd/drbd_receiver.c
Log:
Allow a live attach on a primary node. Since we have the "negotiating"
dstate, which will change from negotiating directly to inconsistent
we can do this nowadays.


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2006-11-15 17:19:31 UTC (rev 2595)
+++ trunk/Makefile	2006-11-15 19:19:18 UTC (rev 2596)
@@ -93,7 +93,7 @@
 	then \
 	   echo "You need to update ChangeLog"; \
 	   up2date=false; fi ; \
-	if ! grep "^drbd ($$dver_re-" >/dev/null 2>&1 debian/changelog; \
+	if ! grep "^drbd8 ($$dver_re-" >/dev/null 2>&1 debian/changelog; \
 	then \
 	   echo -e "\n\n\tdebian/changelog needs some update\n"; \
 	   : do not fail the build because of outdated debian/changelog ; fi ; \

Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-11-15 17:19:31 UTC (rev 2595)
+++ trunk/drbd/drbd_receiver.c	2006-11-15 19:19:18 UTC (rev 2596)
@@ -1941,13 +1941,10 @@
 		drbd_force_state(mdev,NS(conn,Disconnecting));
 		return conn_mask;
 	}
-	if (hg < 0 && 
-	    mdev->state.role == Primary && mydisk >= Consistent ) {
-		ERR("I shall become SyncTarget, but I am primary!\n");
-		drbd_force_state(mdev,NS(conn,Disconnecting));
-		return conn_mask;
-	}
 
+	/* The check "I shall become SyncTarget, but I am primary"
+	   got removed since, we now do live attachs on primary nodes! */
+
 	if (abs(hg) >= 2) {
 		drbd_md_set_flag(mdev,MDF_FullSync);
 		drbd_md_sync(mdev);



More information about the drbd-cvs mailing list