diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2008-03-10 18:16:23 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-04-18 11:56:08 -0400 |
commit | 007dce53a29ccffc000ab5373d188f73881390fd (patch) | |
tree | 84ce6e26cc3bed0cb2e041b1a4aabca3449498ff /fs/ocfs2/dlm/dlmdebug.h | |
parent | 6325b4a22b8f5e40ea9353288b3d6a32181f9718 (diff) |
ocfs2/dlm: Dump the dlm state in a debugfs file
This patch dumps the dlm state (dlm_ctxt) into a debugfs file.
Useful for debugging.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmdebug.h')
-rw-r--r-- | fs/ocfs2/dlm/dlmdebug.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmdebug.h b/fs/ocfs2/dlm/dlmdebug.h index b96959512d96..94cc10a4e19c 100644 --- a/fs/ocfs2/dlm/dlmdebug.h +++ b/fs/ocfs2/dlm/dlmdebug.h | |||
@@ -27,6 +27,19 @@ | |||
27 | 27 | ||
28 | #ifdef CONFIG_DEBUG_FS | 28 | #ifdef CONFIG_DEBUG_FS |
29 | 29 | ||
30 | struct dlm_debug_ctxt { | ||
31 | struct kref debug_refcnt; | ||
32 | struct dentry *debug_state_dentry; | ||
33 | }; | ||
34 | |||
35 | struct debug_buffer { | ||
36 | int len; | ||
37 | char *buf; | ||
38 | }; | ||
39 | |||
40 | int dlm_debug_init(struct dlm_ctxt *dlm); | ||
41 | void dlm_debug_shutdown(struct dlm_ctxt *dlm); | ||
42 | |||
30 | int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm); | 43 | int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm); |
31 | void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm); | 44 | void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm); |
32 | 45 | ||
@@ -35,6 +48,13 @@ void dlm_destroy_debugfs_root(void); | |||
35 | 48 | ||
36 | #else | 49 | #else |
37 | 50 | ||
51 | static int dlm_debug_init(struct dlm_ctxt *dlm) | ||
52 | { | ||
53 | return 0; | ||
54 | } | ||
55 | static void dlm_debug_shutdown(struct dlm_ctxt *dlm) | ||
56 | { | ||
57 | } | ||
38 | static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) | 58 | static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) |
39 | { | 59 | { |
40 | return 0; | 60 | return 0; |