CVSROOT:        /cvs/cluster
Module name:    cluster
Branch:         RHEL5
Changes by:     [EMAIL PROTECTED]       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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tool/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.5&r2=1.2.2.6

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

Reply via email to