linux/fs/dlm/debug_fs.c

// SPDX-License-Identifier: GPL-2.0-only
/******************************************************************************
*******************************************************************************
**
**  Copyright (C) 2005-2009 Red Hat, Inc.  All rights reserved.
**
**
*******************************************************************************
******************************************************************************/

#include <linux/pagemap.h>
#include <linux/seq_file.h>
#include <linux/init.h>
#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <linux/slab.h>

#include "dlm_internal.h"
#include "midcomms.h"
#include "lock.h"
#include "ast.h"

#define DLM_DEBUG_BUF_LEN
static char debug_buf[DLM_DEBUG_BUF_LEN];
static struct mutex debug_buf_lock;

static struct dentry *dlm_root;
static struct dentry *dlm_comms;

static char *print_lockmode(int mode)
{}

static void print_format1_lock(struct seq_file *s, struct dlm_lkb *lkb,
			       struct dlm_rsb *res)
{}

static void print_format1(struct dlm_rsb *res, struct seq_file *s)
{}

static void print_format2_lock(struct seq_file *s, struct dlm_lkb *lkb,
			       struct dlm_rsb *r)
{}

static void print_format2(struct dlm_rsb *r, struct seq_file *s)
{}

static void print_format3_lock(struct seq_file *s, struct dlm_lkb *lkb,
			      int rsb_lookup)
{}

static void print_format3(struct dlm_rsb *r, struct seq_file *s)
{}

static void print_format4(struct dlm_rsb *r, struct seq_file *s)
{}

static const struct seq_operations format1_seq_ops;
static const struct seq_operations format2_seq_ops;
static const struct seq_operations format3_seq_ops;
static const struct seq_operations format4_seq_ops;

/*
 * If the buffer is full, seq_printf can be called again, but it
 * does nothing.  So, the these printing routines periodically check
 * seq_has_overflowed to avoid wasting too much time trying to print to
 * a full buffer.
 */

static int table_seq_show(struct seq_file *seq, void *iter_ptr)
{}

static void *table_seq_start(struct seq_file *seq, loff_t *pos)
{}

static void *table_seq_next(struct seq_file *seq, void *iter_ptr, loff_t *pos)
{}

static void table_seq_stop(struct seq_file *seq, void *iter_ptr)
{}

static const struct seq_operations format1_seq_ops =;

static const struct seq_operations format2_seq_ops =;

static const struct seq_operations format3_seq_ops =;

static const struct seq_operations format4_seq_ops =;

static const struct file_operations format1_fops;
static const struct file_operations format2_fops;
static const struct file_operations format3_fops;
static const struct file_operations format4_fops;

static int table_open1(struct inode *inode, struct file *file)
{}

static int table_open2(struct inode *inode, struct file *file)
{}

static ssize_t table_write2(struct file *file, const char __user *user_buf,
			    size_t count, loff_t *ppos)
{}

static int table_open3(struct inode *inode, struct file *file)
{}

static int table_open4(struct inode *inode, struct file *file)
{}

static const struct file_operations format1_fops =;

static const struct file_operations format2_fops =;

static const struct file_operations format3_fops =;

static const struct file_operations format4_fops =;

/*
 * dump lkb's on the ls_waiters list
 */
static ssize_t waiters_read(struct file *file, char __user *userbuf,
			    size_t count, loff_t *ppos)
{}

static ssize_t waiters_write(struct file *file, const char __user *user_buf,
			     size_t count, loff_t *ppos)
{}

static const struct file_operations waiters_fops =;

void dlm_delete_debug_file(struct dlm_ls *ls)
{}

static int dlm_state_show(struct seq_file *file, void *offset)
{}
DEFINE_SHOW_ATTRIBUTE();

static int dlm_flags_show(struct seq_file *file, void *offset)
{}
DEFINE_SHOW_ATTRIBUTE();

static int dlm_send_queue_cnt_show(struct seq_file *file, void *offset)
{}
DEFINE_SHOW_ATTRIBUTE();

static int dlm_version_show(struct seq_file *file, void *offset)
{}
DEFINE_SHOW_ATTRIBUTE();

static ssize_t dlm_rawmsg_write(struct file *fp, const char __user *user_buf,
				size_t count, loff_t *ppos)
{}

static const struct file_operations dlm_rawmsg_fops =;

void *dlm_create_debug_comms_file(int nodeid, void *data)
{}

void dlm_delete_debug_comms_file(void *ctx)
{}

void dlm_create_debug_file(struct dlm_ls *ls)
{}

void __init dlm_register_debugfs(void)
{}

void dlm_unregister_debugfs(void)
{}