[DRBD-cvs] svn commit by phil - r2406 - trunk/drbd - More verbosity to the VERBOSE_REQUEST_CODE stuff. Local

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Sep 12 11:10:04 CEST 2006


Author: phil
Date: 2006-09-12 11:10:03 +0200 (Tue, 12 Sep 2006)
New Revision: 2406

Modified:
   trunk/drbd/drbd_req.c
Log:
More verbosity to the VERBOSE_REQUEST_CODE stuff.

Local only requests are not on the hash table, therefore
we should not call hlist_del() on such. Fixed that.


Modified: trunk/drbd/drbd_req.c
===================================================================
--- trunk/drbd/drbd_req.c	2006-09-12 07:24:01 UTC (rev 2405)
+++ trunk/drbd/drbd_req.c	2006-09-12 09:10:03 UTC (rev 2406)
@@ -33,7 +33,7 @@
 #include "drbd_int.h"
 #include "drbd_req.h"
 
-// #define VERBOSE_REQUEST_CODE
+//#define VERBOSE_REQUEST_CODE
 #ifdef VERBOSE_REQUEST_CODE
 void print_req_mod(drbd_request_t *req,drbd_req_event_t what) 
 {
@@ -62,7 +62,10 @@
 		[completed_ok] = "completed_ok",
 	};
 
-	INFO("_req_mod(%p,%s)\n",req,rq_event_names[what]);
+	INFO("_req_mod(%p %c ,%s)\n",
+	     req,
+	     bio_data_dir(req->master_bio) == WRITE ? 'W' : 'R',
+	     rq_event_names[what]);
 }
 
 void print_rq_state(drbd_request_t *req, const char *txt)
@@ -70,9 +73,10 @@
 	const unsigned long s = req->rq_state;
 	drbd_dev *mdev = req->mdev;
 
-	INFO("%s%p L%c%c%cN%c%c%c%c%c)\n",
+	INFO("%s%p %c L%c%c%cN%c%c%c%c%c)\n",
 	     txt,
 	     req,
+	     bio_data_dir(req->master_bio) == WRITE ? 'W' : 'R',
 	     s & RQ_LOCAL_PENDING ? 'p' : '-',
 	     s & RQ_LOCAL_COMPLETED ? 'c' : '-',
 	     s & RQ_LOCAL_OK ? 'o' : '-',
@@ -161,7 +165,7 @@
 
 		/* remove the request from the conflict detection
 		 * respective block_id verification hash */
-		hlist_del(&req->colision);
+		if(!hlist_unhashed(&req->colision)) hlist_del(&req->colision);
 
 		/* FIXME not yet implemented...
 		 * in case we got "suspended" (on_disconnect: freeze io)



More information about the drbd-cvs mailing list