aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-08-08 18:08:42 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-08-09 09:46:38 -0400
commitfaa0f2677287a2e7ae796db8b73618ec43715e94 (patch)
treeed3d0477991710785b7c0adc9db26009d1614bfd /fs/dlm
parent06442440bc442ef79cb060c6e786eaeeabd9044b (diff)
[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')
-rw-r--r--fs/dlm/dlm_internal.h1
-rw-r--r--fs/dlm/lockspace.c11
-rw-r--r--fs/dlm/member.c3
-rw-r--r--fs/dlm/rcom.c2
4 files changed, 16 insertions, 1 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 7c3c2d27c012..ec7e401133fd 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -467,6 +467,7 @@ struct dlm_ls {
467 struct list_head ls_requestqueue;/* queue remote requests */ 467 struct list_head ls_requestqueue;/* queue remote requests */
468 struct mutex ls_requestqueue_mutex; 468 struct mutex ls_requestqueue_mutex;
469 char *ls_recover_buf; 469 char *ls_recover_buf;
470 int ls_recover_nodeid; /* for debugging */
470 struct list_head ls_recover_list; 471 struct list_head ls_recover_list;
471 spinlock_t ls_recover_list_lock; 472 spinlock_t ls_recover_list_lock;
472 int ls_recover_list_count; 473 int ls_recover_list_count;
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 31ed0fe16a31..7adaad53fc38 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)
81 return sprintf(buf, "%x\n", status); 81 return sprintf(buf, "%x\n", status);
82} 82}
83 83
84static ssize_t dlm_recover_nodeid_show(struct dlm_ls *ls, char *buf)
85{
86 return sprintf(buf, "%d\n", ls->ls_recover_nodeid);
87}
88
84struct dlm_attr { 89struct dlm_attr {
85 struct attribute attr; 90 struct attribute attr;
86 ssize_t (*show)(struct dlm_ls *, char *); 91 ssize_t (*show)(struct dlm_ls *, char *);
@@ -108,11 +113,17 @@ static struct dlm_attr dlm_attr_recover_status = {
108 .show = dlm_recover_status_show 113 .show = dlm_recover_status_show
109}; 114};
110 115
116static struct dlm_attr dlm_attr_recover_nodeid = {
117 .attr = {.name = "recover_nodeid", .mode = S_IRUGO},
118 .show = dlm_recover_nodeid_show
119};
120
111static struct attribute *dlm_attrs[] = { 121static struct attribute *dlm_attrs[] = {
112 &dlm_attr_control.attr, 122 &dlm_attr_control.attr,
113 &dlm_attr_event.attr, 123 &dlm_attr_event.attr,
114 &dlm_attr_id.attr, 124 &dlm_attr_id.attr,
115 &dlm_attr_recover_status.attr, 125 &dlm_attr_recover_status.attr,
126 &dlm_attr_recover_nodeid.attr,
116 NULL, 127 NULL,
117}; 128};
118 129
diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index ebb33c30f0f3..a3f7de7f3a8f 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -176,7 +176,8 @@ static int ping_members(struct dlm_ls *ls)
176 break; 176 break;
177 } 177 }
178 if (error) 178 if (error)
179 log_debug(ls, "ping_members aborted %d", error); 179 log_debug(ls, "ping_members aborted %d last nodeid %d",
180 error, ls->ls_recover_nodeid);
180 return error; 181 return error;
181} 182}
182 183
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index 55fbe313340e..5573d8590e58 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -97,6 +97,7 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid)
97 int error = 0; 97 int error = 0;
98 98
99 memset(ls->ls_recover_buf, 0, dlm_config.buffer_size); 99 memset(ls->ls_recover_buf, 0, dlm_config.buffer_size);
100 ls->ls_recover_nodeid = nodeid;
100 101
101 if (nodeid == dlm_our_nodeid()) { 102 if (nodeid == dlm_our_nodeid()) {
102 rc = (struct dlm_rcom *) ls->ls_recover_buf; 103 rc = (struct dlm_rcom *) ls->ls_recover_buf;
@@ -159,6 +160,7 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len)
159 int error = 0, len = sizeof(struct dlm_rcom); 160 int error = 0, len = sizeof(struct dlm_rcom);
160 161
161 memset(ls->ls_recover_buf, 0, dlm_config.buffer_size); 162 memset(ls->ls_recover_buf, 0, dlm_config.buffer_size);
163 ls->ls_recover_nodeid = nodeid;
162 164
163 if (nodeid == dlm_our_nodeid()) { 165 if (nodeid == dlm_our_nodeid()) {
164 dlm_copy_master_names(ls, last_name, last_len, 166 dlm_copy_master_names(ls, last_name, last_len,