linux/net/ceph/debugfs.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/ceph/ceph_debug.h>

#include <linux/device.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>

#include <linux/ceph/libceph.h>
#include <linux/ceph/mon_client.h>
#include <linux/ceph/auth.h>
#include <linux/ceph/debugfs.h>

#ifdef CONFIG_DEBUG_FS

/*
 * Implement /sys/kernel/debug/ceph fun
 *
 * /sys/kernel/debug/ceph/client*  - an instance of the ceph client
 *      .../osdmap      - current osdmap
 *      .../monmap      - current monmap
 *      .../osdc        - active osd requests
 *      .../monc        - mon client state
 *      .../client_options - libceph-only (i.e. not rbd or cephfs) options
 *      .../dentry_lru  - dump contents of dentry lru
 *      .../caps        - expose cap (reservation) stats
 *      .../bdi         - symlink to ../../bdi/something
 */

static struct dentry *ceph_debugfs_dir;

static int monmap_show(struct seq_file *s, void *p)
{}

static int osdmap_show(struct seq_file *s, void *p)
{}

static int monc_show(struct seq_file *s, void *p)
{}

static void dump_spgid(struct seq_file *s, const struct ceph_spg *spgid)
{}

static void dump_target(struct seq_file *s, struct ceph_osd_request_target *t)
{}

static void dump_request(struct seq_file *s, struct ceph_osd_request *req)
{}

static void dump_requests(struct seq_file *s, struct ceph_osd *osd)
{}

static void dump_linger_request(struct seq_file *s,
				struct ceph_osd_linger_request *lreq)
{}

static void dump_linger_requests(struct seq_file *s, struct ceph_osd *osd)
{}

static void dump_snapid(struct seq_file *s, u64 snapid)
{}

static void dump_name_escaped(struct seq_file *s, unsigned char *name,
			      size_t len)
{}

static void dump_hoid(struct seq_file *s, const struct ceph_hobject_id *hoid)
{}

static void dump_backoffs(struct seq_file *s, struct ceph_osd *osd)
{}

static int osdc_show(struct seq_file *s, void *pp)
{}

static int client_options_show(struct seq_file *s, void *p)
{}

DEFINE_SHOW_ATTRIBUTE();
DEFINE_SHOW_ATTRIBUTE();
DEFINE_SHOW_ATTRIBUTE();
DEFINE_SHOW_ATTRIBUTE();
DEFINE_SHOW_ATTRIBUTE();

void __init ceph_debugfs_init(void)
{}

void ceph_debugfs_cleanup(void)
{}

void ceph_debugfs_client_init(struct ceph_client *client)
{}

void ceph_debugfs_client_cleanup(struct ceph_client *client)
{}

#else  /* CONFIG_DEBUG_FS */

void __init ceph_debugfs_init(void)
{
}

void ceph_debugfs_cleanup(void)
{
}

void ceph_debugfs_client_init(struct ceph_client *client)
{
}

void ceph_debugfs_client_cleanup(struct ceph_client *client)
{
}

#endif  /* CONFIG_DEBUG_FS */