#include <linux/device-mapper.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/bio.h>
#include <linux/slab.h>
#define DM_MSG_PREFIX …
#define PROBABILITY_BASE …
#define all_corrupt_bio_flags_match(bio, fc) …
struct flakey_c { … };
enum feature_flag_bits { … };
struct per_bio_data { … };
static int parse_features(struct dm_arg_set *as, struct flakey_c *fc,
struct dm_target *ti)
{ … }
static int flakey_ctr(struct dm_target *ti, unsigned int argc, char **argv)
{ … }
static void flakey_dtr(struct dm_target *ti)
{ … }
static sector_t flakey_map_sector(struct dm_target *ti, sector_t bi_sector)
{ … }
static void flakey_map_bio(struct dm_target *ti, struct bio *bio)
{ … }
static void corrupt_bio_common(struct bio *bio, unsigned int corrupt_bio_byte,
unsigned char corrupt_bio_value)
{ … }
static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc)
{ … }
static void corrupt_bio_random(struct bio *bio)
{ … }
static void clone_free(struct bio *clone)
{ … }
static void clone_endio(struct bio *clone)
{ … }
static struct bio *clone_bio(struct dm_target *ti, struct flakey_c *fc, struct bio *bio)
{ … }
static int flakey_map(struct dm_target *ti, struct bio *bio)
{ … }
static int flakey_end_io(struct dm_target *ti, struct bio *bio,
blk_status_t *error)
{ … }
static void flakey_status(struct dm_target *ti, status_type_t type,
unsigned int status_flags, char *result, unsigned int maxlen)
{ … }
static int flakey_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
{ … }
#ifdef CONFIG_BLK_DEV_ZONED
static int flakey_report_zones(struct dm_target *ti,
struct dm_report_zones_args *args, unsigned int nr_zones)
{ … }
#else
#define flakey_report_zones …
#endif
static int flakey_iterate_devices(struct dm_target *ti, iterate_devices_callout_fn fn, void *data)
{ … }
static struct target_type flakey_target = …;
module_dm(flakey);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;