diff options
Diffstat (limited to 'fs/dlm/lockspace.c')
-rw-r--r-- | fs/dlm/lockspace.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index d2ff505d51cd..9ed4b70348fb 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "config.h" | 21 | #include "config.h" |
22 | #include "memory.h" | 22 | #include "memory.h" |
23 | #include "lock.h" | 23 | #include "lock.h" |
24 | #include "recover.h" | ||
24 | 25 | ||
25 | #ifdef CONFIG_DLM_DEBUG | 26 | #ifdef CONFIG_DLM_DEBUG |
26 | int dlm_create_debug_file(struct dlm_ls *ls); | 27 | int dlm_create_debug_file(struct dlm_ls *ls); |
@@ -74,6 +75,12 @@ static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len) | |||
74 | return len; | 75 | return len; |
75 | } | 76 | } |
76 | 77 | ||
78 | static ssize_t dlm_recover_status_show(struct dlm_ls *ls, char *buf) | ||
79 | { | ||
80 | uint32_t status = dlm_recover_status(ls); | ||
81 | return sprintf(buf, "%x\n", status); | ||
82 | } | ||
83 | |||
77 | struct dlm_attr { | 84 | struct dlm_attr { |
78 | struct attribute attr; | 85 | struct attribute attr; |
79 | ssize_t (*show)(struct dlm_ls *, char *); | 86 | ssize_t (*show)(struct dlm_ls *, char *); |
@@ -96,10 +103,16 @@ static struct dlm_attr dlm_attr_id = { | |||
96 | .store = dlm_id_store | 103 | .store = dlm_id_store |
97 | }; | 104 | }; |
98 | 105 | ||
106 | static struct dlm_attr dlm_attr_recover_status = { | ||
107 | .attr = {.name = "recover_status", .mode = S_IRUGO}, | ||
108 | .show = dlm_recover_status_show | ||
109 | }; | ||
110 | |||
99 | static struct attribute *dlm_attrs[] = { | 111 | static struct attribute *dlm_attrs[] = { |
100 | &dlm_attr_control.attr, | 112 | &dlm_attr_control.attr, |
101 | &dlm_attr_event.attr, | 113 | &dlm_attr_event.attr, |
102 | &dlm_attr_id.attr, | 114 | &dlm_attr_id.attr, |
115 | &dlm_attr_recover_status.attr, | ||
103 | NULL, | 116 | NULL, |
104 | }; | 117 | }; |
105 | 118 | ||