[DRBD-cvs] svn commit by phil - r2654 - in trunk: drbd user - * The setting of the UUIDs after resync was not correct

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Wed Jan 3 10:49:48 CET 2007


Author: phil
Date: 2007-01-03 10:49:46 +0100 (Wed, 03 Jan 2007)
New Revision: 2654

Modified:
   trunk/drbd/drbd_main.c
   trunk/drbd/drbd_worker.c
   trunk/user/drbdsetup.c
Log:
* The setting of the UUIDs after resync was not correct. Fixed that
* Added the RSWriteAck to the packet dumping code [Simon].
* Fixed the error reporting of drbdsetup



Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c	2007-01-02 20:10:42 UTC (rev 2653)
+++ trunk/drbd/drbd_main.c	2007-01-03 09:49:46 UTC (rev 2654)
@@ -3102,6 +3102,7 @@
 
 	case RecvAck:
 	case WriteAck:
+	case RSWriteAck:
 	case DiscardAck:
 	case NegAck:
 	case NegRSDReply:

Modified: trunk/drbd/drbd_worker.c
===================================================================
--- trunk/drbd/drbd_worker.c	2007-01-02 20:10:42 UTC (rev 2653)
+++ trunk/drbd/drbd_worker.c	2007-01-03 09:49:46 UTC (rev 2654)
@@ -420,7 +420,6 @@
 				for ( i=Bitmap ; i<=History_end ; i++ ) {
 					_drbd_uuid_set(mdev,i,mdev->p_uuid[i]);
 				}
-				drbd_uuid_set_bm(mdev,0UL); //Rotate peer's bitmap-UUID
 				drbd_uuid_set(mdev,Current,mdev->p_uuid[Current]);
 			} else {
 				ERR("mdev->p_uuid is NULL! BUG\n");
@@ -430,10 +429,13 @@
 		drbd_uuid_set_bm(mdev,0UL);
 
 		if ( mdev->p_uuid ) {
-			kfree(mdev->p_uuid);
-			mdev->p_uuid = NULL;
+			// Now the two UUID sets are equal, update what we 
+			// know of the peer.
+			int i;
+			for ( i=Current ; i<=History_end ; i++ ) {
+				mdev->p_uuid[i]=mdev->bc->md.uuid[i];
+			}			
 		}
-		drbd_send_uuids(mdev);
 	}
 
 	mdev->rs_total  = 0;

Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c	2007-01-02 20:10:42 UTC (rev 2653)
+++ trunk/user/drbdsetup.c	2007-01-03 09:49:46 UTC (rev 2654)
@@ -717,7 +717,7 @@
 	if (err_no == SS_Success) return rv;
 
 	if ( ( err_no >= AfterLastRetCode || err_no <= RetCodeBase ) &&
-	     ( err_no > SS_CW_NoNeed || err_no < SS_CW_FailedByPeer) ) {
+	     ( err_no > SS_CW_NoNeed || err_no < SS_DeviceInUse) ) {
 		fprintf(stderr,"Error code %d unknown.\n"
 			"You should updated the drbd userland tools.\n",err_no);
 		rv = 20;



More information about the drbd-cvs mailing list