#include "dm-core.h"
#include <linux/device-mapper.h>
#include <linux/bio.h>
#include <linux/completion.h>
#include <linux/mempool.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/dm-io.h>
#define DM_MSG_PREFIX …
#define DM_IO_MAX_REGIONS …
struct dm_io_client { … };
struct io { … } __aligned(…);
static struct kmem_cache *_dm_io_cache;
struct dm_io_client *dm_io_client_create(void)
{ … }
EXPORT_SYMBOL(…);
void dm_io_client_destroy(struct dm_io_client *client)
{ … }
EXPORT_SYMBOL(…);
static void store_io_and_region_in_bio(struct bio *bio, struct io *io,
unsigned int region)
{ … }
static void retrieve_io_and_region_from_bio(struct bio *bio, struct io **io,
unsigned int *region)
{ … }
static void complete_io(struct io *io)
{ … }
static void dec_count(struct io *io, unsigned int region, blk_status_t error)
{ … }
static void endio(struct bio *bio)
{ … }
struct dpages { … };
static void list_get_page(struct dpages *dp,
struct page **p, unsigned long *len, unsigned int *offset)
{ … }
static void list_next_page(struct dpages *dp)
{ … }
static void list_dp_init(struct dpages *dp, struct page_list *pl, unsigned int offset)
{ … }
static void bio_get_page(struct dpages *dp, struct page **p,
unsigned long *len, unsigned int *offset)
{ … }
static void bio_next_page(struct dpages *dp)
{ … }
static void bio_dp_init(struct dpages *dp, struct bio *bio)
{ … }
static void vm_get_page(struct dpages *dp,
struct page **p, unsigned long *len, unsigned int *offset)
{ … }
static void vm_next_page(struct dpages *dp)
{ … }
static void vm_dp_init(struct dpages *dp, void *data)
{ … }
static void km_get_page(struct dpages *dp, struct page **p, unsigned long *len,
unsigned int *offset)
{ … }
static void km_next_page(struct dpages *dp)
{ … }
static void km_dp_init(struct dpages *dp, void *data)
{ … }
static void do_region(const blk_opf_t opf, unsigned int region,
struct dm_io_region *where, struct dpages *dp,
struct io *io, unsigned short ioprio)
{ … }
static void dispatch_io(blk_opf_t opf, unsigned int num_regions,
struct dm_io_region *where, struct dpages *dp,
struct io *io, unsigned short ioprio)
{ … }
static void async_io(struct dm_io_client *client, unsigned int num_regions,
struct dm_io_region *where, blk_opf_t opf,
struct dpages *dp, io_notify_fn fn, void *context,
unsigned short ioprio)
{ … }
struct sync_io { … };
static void sync_io_complete(unsigned long error, void *context)
{ … }
static int sync_io(struct dm_io_client *client, unsigned int num_regions,
struct dm_io_region *where, blk_opf_t opf, struct dpages *dp,
unsigned long *error_bits, unsigned short ioprio)
{ … }
static int dp_init(struct dm_io_request *io_req, struct dpages *dp,
unsigned long size)
{ … }
int dm_io(struct dm_io_request *io_req, unsigned int num_regions,
struct dm_io_region *where, unsigned long *sync_error_bits,
unsigned short ioprio)
{ … }
EXPORT_SYMBOL(…);
int __init dm_io_init(void)
{ … }
void dm_io_exit(void)
{ … }