Thomas Gleixner | 328970d | 2019-05-24 12:04:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 2 | /* -*- mode: c; c-basic-offset: 8; -*- |
| 3 | * vim: noexpandtab sw=8 ts=8 sts=0: |
| 4 | * |
| 5 | * dlmdebug.h |
| 6 | * |
| 7 | * Copyright (C) 2008 Oracle. All rights reserved. |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef DLMDEBUG_H |
| 11 | #define DLMDEBUG_H |
| 12 | |
Sunil Mushran | e5a0334 | 2008-03-10 15:16:28 -0700 | [diff] [blame] | 13 | void dlm_print_one_mle(struct dlm_master_list_entry *mle); |
| 14 | |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 15 | #ifdef CONFIG_DEBUG_FS |
| 16 | |
Sunil Mushran | 4e3d24e | 2008-03-10 15:16:24 -0700 | [diff] [blame] | 17 | struct debug_lockres { |
| 18 | int dl_len; |
| 19 | char *dl_buf; |
| 20 | struct dlm_ctxt *dl_ctxt; |
| 21 | struct dlm_lock_resource *dl_res; |
| 22 | }; |
| 23 | |
Greg Kroah-Hartman | e581595 | 2019-07-11 20:53:12 -0700 | [diff] [blame] | 24 | void dlm_debug_init(struct dlm_ctxt *dlm); |
Sunil Mushran | 007dce5 | 2008-03-10 15:16:23 -0700 | [diff] [blame] | 25 | |
Greg Kroah-Hartman | 5e7a3ed | 2019-09-23 15:33:15 -0700 | [diff] [blame] | 26 | void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm); |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 27 | void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm); |
| 28 | |
Greg Kroah-Hartman | e581595 | 2019-07-11 20:53:12 -0700 | [diff] [blame] | 29 | void dlm_create_debugfs_root(void); |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 30 | void dlm_destroy_debugfs_root(void); |
| 31 | |
| 32 | #else |
| 33 | |
Greg Kroah-Hartman | e581595 | 2019-07-11 20:53:12 -0700 | [diff] [blame] | 34 | static inline void dlm_debug_init(struct dlm_ctxt *dlm) |
Sunil Mushran | 007dce5 | 2008-03-10 15:16:23 -0700 | [diff] [blame] | 35 | { |
Sunil Mushran | 007dce5 | 2008-03-10 15:16:23 -0700 | [diff] [blame] | 36 | } |
Greg Kroah-Hartman | 5e7a3ed | 2019-09-23 15:33:15 -0700 | [diff] [blame] | 37 | static inline void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) |
Sunil Mushran | 007dce5 | 2008-03-10 15:16:23 -0700 | [diff] [blame] | 38 | { |
| 39 | } |
Sunil Mushran | 959040c | 2008-05-12 18:31:36 -0700 | [diff] [blame] | 40 | static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 41 | { |
| 42 | } |
Greg Kroah-Hartman | e581595 | 2019-07-11 20:53:12 -0700 | [diff] [blame] | 43 | static inline void dlm_create_debugfs_root(void) |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 44 | { |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 45 | } |
Sunil Mushran | 959040c | 2008-05-12 18:31:36 -0700 | [diff] [blame] | 46 | static inline void dlm_destroy_debugfs_root(void) |
Sunil Mushran | 6325b4a | 2008-03-10 15:16:22 -0700 | [diff] [blame] | 47 | { |
| 48 | } |
| 49 | |
| 50 | #endif /* CONFIG_DEBUG_FS */ |
| 51 | #endif /* DLMDEBUG_H */ |