[DRBD-cvs] svn commit by phil - r3006 - branches/drbd-8.0/drbd - Ernest pointed this out. When we attach a disk to a con

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Thu Aug 2 11:35:18 CEST 2007


Author: phil
Date: 2007-08-02 11:35:17 +0200 (Thu, 02 Aug 2007)
New Revision: 3006

Modified:
   branches/drbd-8.0/drbd/drbd_main.c
Log:
Ernest pointed this out.

When we attach a disk to a connected device pair, we are in
disk state Nogotiating on the node that gets the disk attached.

When in the mean time some event on the peer node triggers
the transmittion of a state packet, we might end up using an
old p_uuid set and find a wrong resync decission.

Fixed that.


Modified: branches/drbd-8.0/drbd/drbd_main.c
===================================================================
--- branches/drbd-8.0/drbd/drbd_main.c	2007-08-01 15:05:52 UTC (rev 3005)
+++ branches/drbd-8.0/drbd/drbd_main.c	2007-08-02 09:35:17 UTC (rev 3006)
@@ -947,6 +947,8 @@
 	/* Last part of the attaching process ... */
 	if ( ns.conn >= Connected && 
 	     os.disk == Attaching && ns.disk == Negotiating ) {
+		kfree(mdev->p_uuid); /* We expect to receive up-to-date UUIDs soon. */
+		mdev->p_uuid = NULL; /* ...to not use the old ones in the mean time */
 		drbd_send_sizes(mdev);  // to start sync...
 		drbd_send_uuids(mdev);
 		drbd_send_state(mdev);



More information about the drbd-cvs mailing list