linux/fs/bcachefs/debug.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Assorted bcachefs debug code
 *
 * Copyright 2010, 2011 Kent Overstreet <[email protected]>
 * Copyright 2012 Google, Inc.
 */

#include "bcachefs.h"
#include "bkey_methods.h"
#include "btree_cache.h"
#include "btree_io.h"
#include "btree_iter.h"
#include "btree_locking.h"
#include "btree_update.h"
#include "btree_update_interior.h"
#include "buckets.h"
#include "debug.h"
#include "error.h"
#include "extents.h"
#include "fsck.h"
#include "inode.h"
#include "super.h"

#include <linux/console.h>
#include <linux/debugfs.h>
#include <linux/module.h>
#include <linux/random.h>
#include <linux/seq_file.h>

static struct dentry *bch_debug;

static bool bch2_btree_verify_replica(struct bch_fs *c, struct btree *b,
				      struct extent_ptr_decoded pick)
{}

void __bch2_btree_verify(struct bch_fs *c, struct btree *b)
{}

void bch2_btree_node_ondisk_to_text(struct printbuf *out, struct bch_fs *c,
				    const struct btree *b)
{}

#ifdef CONFIG_DEBUG_FS

/* XXX: bch_fs refcounting */

struct dump_iter {};

static ssize_t flush_buf(struct dump_iter *i)
{}

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

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

static ssize_t bch2_read_btree(struct file *file, char __user *buf,
			       size_t size, loff_t *ppos)
{}

static const struct file_operations btree_debug_ops =;

static ssize_t bch2_read_btree_formats(struct file *file, char __user *buf,
				       size_t size, loff_t *ppos)
{}

static const struct file_operations btree_format_debug_ops =;

static ssize_t bch2_read_bfloat_failed(struct file *file, char __user *buf,
				       size_t size, loff_t *ppos)
{}

static const struct file_operations bfloat_failed_debug_ops =;

static void bch2_cached_btree_node_to_text(struct printbuf *out, struct bch_fs *c,
					   struct btree *b)
{}

static ssize_t bch2_cached_btree_nodes_read(struct file *file, char __user *buf,
					    size_t size, loff_t *ppos)
{}

static const struct file_operations cached_btree_nodes_ops =;

list_cmp_fn;

static void list_sort(struct list_head *head, list_cmp_fn cmp)
{}

static int list_ptr_order_cmp(const struct list_head *l, const struct list_head *r)
{}

static ssize_t bch2_btree_transactions_read(struct file *file, char __user *buf,
					    size_t size, loff_t *ppos)
{}

static const struct file_operations btree_transactions_ops =;

static ssize_t bch2_journal_pins_read(struct file *file, char __user *buf,
				      size_t size, loff_t *ppos)
{}

static const struct file_operations journal_pins_ops =;

static ssize_t bch2_btree_updates_read(struct file *file, char __user *buf,
				       size_t size, loff_t *ppos)
{}

static const struct file_operations btree_updates_ops =;

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

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

static ssize_t btree_transaction_stats_read(struct file *file, char __user *buf,
					    size_t size, loff_t *ppos)
{}

static const struct file_operations btree_transaction_stats_op =;

/* walk btree transactions until we find a deadlock and print it */
static void btree_deadlock_to_text(struct printbuf *out, struct bch_fs *c)
{}

static ssize_t bch2_btree_deadlock_read(struct file *file, char __user *buf,
					    size_t size, loff_t *ppos)
{}

static const struct file_operations btree_deadlock_ops =;

void bch2_fs_debug_exit(struct bch_fs *c)
{}

static void bch2_fs_debug_btree_init(struct bch_fs *c, struct btree_debug *bd)
{}

void bch2_fs_debug_init(struct bch_fs *c)
{}

#endif

void bch2_debug_exit(void)
{}

int __init bch2_debug_init(void)
{}