[DRBD-cvs] svn commit by phil - r2424 - in trunk/drbd: . linux - Worked on the primary + diskless mode. Seems to work no

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Thu Sep 14 17:04:07 CEST 2006


Author: phil
Date: 2006-09-14 17:04:05 +0200 (Thu, 14 Sep 2006)
New Revision: 2424

Modified:
   trunk/drbd/drbd_receiver.c
   trunk/drbd/drbd_req.c
   trunk/drbd/drbd_worker.c
   trunk/drbd/linux/drbd.h
Log:
Worked on the primary + diskless mode. Seems to work now.

Lars: Please verify my addition of req_mod(req,handed_over_to_network)
      in w_send_read_req() . Thanks.



Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-09-14 12:15:51 UTC (rev 2423)
+++ trunk/drbd/drbd_receiver.c	2006-09-14 15:04:05 UTC (rev 2424)
@@ -1995,6 +1995,9 @@
 		drbd_determin_dev_size(mdev);
 		drbd_bm_unlock(mdev); // }
 		dec_local(mdev);
+	} else {
+		// I am diskless, need to accept the peer's size.
+		drbd_set_my_capacity(mdev,p_size);
 	}
 
 	if (mdev->p_uuid && mdev->state.conn <= Connected && inc_local(mdev)) {

Modified: trunk/drbd/drbd_req.c
===================================================================
--- trunk/drbd/drbd_req.c	2006-09-14 12:15:51 UTC (rev 2423)
+++ trunk/drbd/drbd_req.c	2006-09-14 15:04:05 UTC (rev 2424)
@@ -806,8 +806,6 @@
 			    ( mdev->state.pdsk == Inconsistent &&
 			      mdev->state.conn >= Connected ) );
 
-	D_ASSERT( (rw != WRITE) || (remote == (mdev->state.conn >= Connected)) );
-
 	if (!(local || remote)) {
 		ERR("IO ERROR: neither local nor remote disk\n");
 		goto fail_and_free_req;

Modified: trunk/drbd/drbd_worker.c
===================================================================
--- trunk/drbd/drbd_worker.c	2006-09-14 12:15:51 UTC (rev 2423)
+++ trunk/drbd/drbd_worker.c	2006-09-14 15:04:05 UTC (rev 2424)
@@ -565,7 +565,9 @@
 	ok = drbd_send_drequest(mdev, DataRequest, req->sector, req->size,
 				(unsigned long)req);
 
-	if (!ok) {
+	if(ok) {
+		req_mod(req, handed_over_to_network);
+	} else {
 		/* ?? we set Timeout or BrokenPipe in drbd_send() */
 		if (mdev->state.conn >= Connected) 
 			drbd_force_state(mdev,NS(conn,NetworkFailure));

Modified: trunk/drbd/linux/drbd.h
===================================================================
--- trunk/drbd/linux/drbd.h	2006-09-14 12:15:51 UTC (rev 2423)
+++ trunk/drbd/linux/drbd.h	2006-09-14 15:04:05 UTC (rev 2424)
@@ -154,6 +154,7 @@
 	Diskless,
 	Attaching,      /* In the process of reading the meta-data */
 	Failed,         /* Becomes Diskless as soon as we told it the peer */
+			/* when >= Failed it is legal to access mdev->bc */
 	Inconsistent,
 	Outdated,
 	DUnknown,       /* Only used for the peer, never for myself */



More information about the drbd-cvs mailing list