summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {
struct list_head ls_requestqueue;/* queue remote requests */
struct mutex ls_requestqueue_mutex;
char *ls_recover_buf;
+ int ls_recover_nodeid; /* for debugging */
struct list_head ls_recover_list;
spinlock_t ls_recover_list_lock;
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)
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,
};
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)
break;
}
if (error)
- log_debug(ls, "ping_members aborted %d", error);
+ log_debug(ls, "ping_members aborted %d last nodeid %d",
+ error, ls->ls_recover_nodeid);
return error;
}
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)
int error = 0;
memset(ls->ls_recover_buf, 0, dlm_config.buffer_size);
+ ls->ls_recover_nodeid = nodeid;
if (nodeid == dlm_our_nodeid()) {
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)
int error = 0, len = sizeof(struct dlm_rcom);
memset(ls->ls_recover_buf, 0, dlm_config.buffer_size);
+ ls->ls_recover_nodeid = nodeid;
if (nodeid == dlm_our_nodeid()) {
dlm_copy_master_names(ls, last_name, last_len,