linux/drivers/md/dm-zero.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2003 Jana Saout <[email protected]>
 *
 * This file is released under the GPL.
 */

#include <linux/device-mapper.h>

#include <linux/module.h>
#include <linux/init.h>
#include <linux/bio.h>

#define DM_MSG_PREFIX

/*
 * Construct a dummy mapping that only returns zeros
 */
static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv)
{}

/*
 * Return zeros only on reads
 */
static int zero_map(struct dm_target *ti, struct bio *bio)
{}

static void zero_io_hints(struct dm_target *ti, struct queue_limits *limits)
{}

static struct target_type zero_target =;
module_dm(zero);

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