blob: f8fd8680a4b6c83259da6901a605095f5f5ef67a [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-or-later */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/* -*- 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.
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00008 */
9
10#ifndef DLMDEBUG_H
11#define DLMDEBUG_H
12
13void dlm_print_one_mle(struct dlm_master_list_entry *mle);
14
15#ifdef CONFIG_DEBUG_FS
16
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000017struct 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
David Brazdil0f672f62019-12-10 10:32:29 +000024void dlm_debug_init(struct dlm_ctxt *dlm);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000025
David Brazdil0f672f62019-12-10 10:32:29 +000026void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000027void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm);
28
David Brazdil0f672f62019-12-10 10:32:29 +000029void dlm_create_debugfs_root(void);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000030void dlm_destroy_debugfs_root(void);
31
32#else
33
David Brazdil0f672f62019-12-10 10:32:29 +000034static inline void dlm_debug_init(struct dlm_ctxt *dlm)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000035{
36}
David Brazdil0f672f62019-12-10 10:32:29 +000037static inline void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000038{
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000039}
40static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm)
41{
42}
David Brazdil0f672f62019-12-10 10:32:29 +000043static inline void dlm_create_debugfs_root(void)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000044{
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000045}
46static inline void dlm_destroy_debugfs_root(void)
47{
48}
49
50#endif /* CONFIG_DEBUG_FS */
51#endif /* DLMDEBUG_H */