[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
Branch: 	RHEL5
Changes by:	teigland sourceware org	2007-10-17 18:10:56

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.


--- cluster/dlm/tool/main.c	2007/08/20 20:48:05
+++ cluster/dlm/tool/main.c	2007/10/17 18:10:56
@@ -372,6 +372,15 @@
+		/* 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]