linux/drivers/md/dm-vdo/dump.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright 2023 Red Hat
 */

#include "dump.h"

#include <linux/module.h>

#include "memory-alloc.h"
#include "string-utils.h"

#include "constants.h"
#include "data-vio.h"
#include "dedupe.h"
#include "funnel-workqueue.h"
#include "io-submitter.h"
#include "logger.h"
#include "types.h"
#include "vdo.h"

enum dump_options {};

enum dump_option_flags {};

#define FLAGS_ALL_POOLS
#define DEFAULT_DUMP_FLAGS
/* Another static buffer... log10(256) = 2.408+, round up: */
#define DIGITS_PER_U64

static inline bool is_arg_string(const char *arg, const char *this_option)
{}

static void do_dump(struct vdo *vdo, unsigned int dump_options_requested,
		    const char *why)
{}

static int parse_dump_options(unsigned int argc, char *const *argv,
			      unsigned int *dump_options_requested_ptr)
{}

/* Dump as specified by zero or more string arguments. */
int vdo_dump(struct vdo *vdo, unsigned int argc, char *const *argv, const char *why)
{}

/* Dump everything we know how to dump */
void vdo_dump_all(struct vdo *vdo, const char *why)
{}

/*
 * Dump out the data_vio waiters on a waitq.
 * wait_on should be the label to print for queue (e.g. logical or physical)
 */
static void dump_vio_waiters(struct vdo_wait_queue *waitq, char *wait_on)
{}

/*
 * Encode various attributes of a data_vio as a string of one-character flags. This encoding is for
 * logging brevity:
 *
 * R => vio completion result not VDO_SUCCESS
 * W => vio is on a waitq
 * D => vio is a duplicate
 * p => vio is a partial block operation
 * z => vio is a zero block
 * d => vio is a discard
 *
 * The common case of no flags set will result in an empty, null-terminated buffer. If any flags
 * are encoded, the first character in the string will be a space character.
 */
static void encode_vio_dump_flags(struct data_vio *data_vio, char buffer[8])
{}

/* Implements buffer_dump_function. */
void dump_data_vio(void *data)
{}