linux/drivers/md/dm-delay.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2005-2007 Red Hat GmbH
 *
 * A target that delays reads and/or writes and can send
 * them to different devices.
 *
 * This file is released under the GPL.
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/bio.h>
#include <linux/slab.h>
#include <linux/kthread.h>

#include <linux/device-mapper.h>

#define DM_MSG_PREFIX

struct delay_class {};

struct delay_c {};

struct dm_delay_info {};

static void handle_delayed_timer(struct timer_list *t)
{}

static void queue_timeout(struct delay_c *dc, unsigned long expires)
{}

static inline bool delay_is_fast(struct delay_c *dc)
{}

static void flush_bios(struct bio *bio)
{}

static void flush_delayed_bios(struct delay_c *dc, bool flush_all)
{}

static int flush_worker_fn(void *data)
{}

static void flush_expired_bios(struct work_struct *work)
{}

static void delay_dtr(struct dm_target *ti)
{}

static int delay_class_ctr(struct dm_target *ti, struct delay_class *c, char **argv)
{}

/*
 * Mapping parameters:
 *    <device> <offset> <delay> [<write_device> <write_offset> <write_delay>]
 *
 * With separate write parameters, the first set is only used for reads.
 * Offsets are specified in sectors.
 * Delays are specified in milliseconds.
 */
static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv)
{}

static int delay_bio(struct delay_c *dc, struct delay_class *c, struct bio *bio)
{}

static void delay_presuspend(struct dm_target *ti)
{}

static void delay_resume(struct dm_target *ti)
{}

static int delay_map(struct dm_target *ti, struct bio *bio)
{}

#define DMEMIT_DELAY_CLASS(c)

static void delay_status(struct dm_target *ti, status_type_t type,
			 unsigned int status_flags, char *result, unsigned int maxlen)
{}

static int delay_iterate_devices(struct dm_target *ti,
				 iterate_devices_callout_fn fn, void *data)
{}

static struct target_type delay_target =;
module_dm(delay);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();