From mboxrd@z Thu Jan 1 00:00:00 1970 From: teigland@sourceware.org Date: 17 Oct 2007 18:08:48 -0000 Subject: [Cluster-devel] cluster/dlm/tool main.c Message-ID: <20071017180848.442.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Changes by: teigland at 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);