summaryrefslogtreecommitdiffstats
path: root/fs/dlm/lockspace.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-08-08 17:08:42 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-08-09 09:46:38 -0400
commitfaa0f2677287a2e7ae796db8b73618ec43715e94 (patch)
treeed3d0477991710785b7c0adc9db26009d1614bfd /fs/dlm/lockspace.c
parent06442440bc442ef79cb060c6e786eaeeabd9044b (diff)
downloadop-kernel-dev-faa0f2677287a2e7ae796db8b73618ec43715e94.zip
op-kernel-dev-faa0f2677287a2e7ae796db8b73618ec43715e94.tar.gz
[DLM] show nodeid for recovery message
To aid debugging, it's useful to be able to see what nodeid the dlm is waiting on for a message reply. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/lockspace.c')
-rw-r--r--fs/dlm/lockspace.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 31ed0fe..7adaad5 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -81,6 +81,11 @@ static ssize_t dlm_recover_status_show(struct dlm_ls *ls, char *buf)
return sprintf(buf, "%x\n", status);
}
+static ssize_t dlm_recover_nodeid_show(struct dlm_ls *ls, char *buf)
+{
+ return sprintf(buf, "%d\n", ls->ls_recover_nodeid);
+}
+
struct dlm_attr {
struct attribute attr;
ssize_t (*show)(struct dlm_ls *, char *);
@@ -108,11 +113,17 @@ static struct dlm_attr dlm_attr_recover_status = {
.show = dlm_recover_status_show
};
+static struct dlm_attr dlm_attr_recover_nodeid = {
+ .attr = {.name = "recover_nodeid", .mode = S_IRUGO},
+ .show = dlm_recover_nodeid_show
+};
+
static struct attribute *dlm_attrs[] = {
&dlm_attr_control.attr,
&dlm_attr_event.attr,
&dlm_attr_id.attr,
&dlm_attr_recover_status.attr,
+ &dlm_attr_recover_nodeid.attr,
NULL,
};
OpenPOWER on IntegriCloud