blob: f8fd8680a4b6c83259da6901a605095f5f5ef67a [file] [log] [blame]
Thomas Gleixner328970d2019-05-24 12:04:05 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Sunil Mushran6325b4a2008-03-10 15:16:22 -07002/* -*- 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 Mushran6325b4a2008-03-10 15:16:22 -07008 */
9
10#ifndef DLMDEBUG_H
11#define DLMDEBUG_H
12
Sunil Mushrane5a03342008-03-10 15:16:28 -070013void dlm_print_one_mle(struct dlm_master_list_entry *mle);
14
Sunil Mushran6325b4a2008-03-10 15:16:22 -070015#ifdef CONFIG_DEBUG_FS
16
Sunil Mushran4e3d24e2008-03-10 15:16:24 -070017struct 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-Hartmane5815952019-07-11 20:53:12 -070024void dlm_debug_init(struct dlm_ctxt *dlm);
Sunil Mushran007dce52008-03-10 15:16:23 -070025
Greg Kroah-Hartman5e7a3ed2019-09-23 15:33:15 -070026void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm);
Sunil Mushran6325b4a2008-03-10 15:16:22 -070027void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm);
28
Greg Kroah-Hartmane5815952019-07-11 20:53:12 -070029void dlm_create_debugfs_root(void);
Sunil Mushran6325b4a2008-03-10 15:16:22 -070030void dlm_destroy_debugfs_root(void);
31
32#else
33
Greg Kroah-Hartmane5815952019-07-11 20:53:12 -070034static inline void dlm_debug_init(struct dlm_ctxt *dlm)
Sunil Mushran007dce52008-03-10 15:16:23 -070035{
Sunil Mushran007dce52008-03-10 15:16:23 -070036}
Greg Kroah-Hartman5e7a3ed2019-09-23 15:33:15 -070037static inline void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm)
Sunil Mushran007dce52008-03-10 15:16:23 -070038{
39}
Sunil Mushran959040c2008-05-12 18:31:36 -070040static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm)
Sunil Mushran6325b4a2008-03-10 15:16:22 -070041{
42}
Greg Kroah-Hartmane5815952019-07-11 20:53:12 -070043static inline void dlm_create_debugfs_root(void)
Sunil Mushran6325b4a2008-03-10 15:16:22 -070044{
Sunil Mushran6325b4a2008-03-10 15:16:22 -070045}
Sunil Mushran959040c2008-05-12 18:31:36 -070046static inline void dlm_destroy_debugfs_root(void)
Sunil Mushran6325b4a2008-03-10 15:16:22 -070047{
48}
49
50#endif /* CONFIG_DEBUG_FS */
51#endif /* DLMDEBUG_H */