[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/dlm/tool main.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2007-10-17 18:08:47

Modified files:
	dlm/tool       : main.c 

Log message:
	The output of 'dlm_tool lockdump' could make it appear that a granted
	lock was still converting because the rqmode reported by the kernel
	is not reset to IV when a NOQUEUE convert fails.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tool/main.c.diff?cvsroot=cluster&r1=1.8&r2=1.9

--- cluster/dlm/tool/main.c	2007/08/20 20:48:16	1.8
+++ cluster/dlm/tool/main.c	2007/10/17 18:08:47	1.9
@@ -367,6 +367,15 @@
 			continue;
 		}
 
+		/* A hack because dlm-kernel doesn't set rqmode back to NL when
+		   a NOQUEUE convert fails, which means in a lockdump it looks
+		   like a granted lock is still converting since rqmode is not
+		   NL.  (does it make sense to include status in the output,
+		   e.g. G,C,W?) */
+
+		if (status == DLM_LKSTS_GRANTED)
+			rqmode = DLM_LOCK_NL;
+
 		printf("id %08x gr %s rq %s pid %u master %d \"%s\"\n",
 			id, mode_str(grmode), mode_str(rqmode),
 			ownpid, nodeid, r_name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]