/* If the IO is asynchronous (i.e. it has notify.fn), you must either unplug the queue with blk_unplug() some time later or set the BIO_RW_SYNC bit in io_req->bi_rw. If you fail to do one of these, the IO will be submitted to the disk after q->unplug_delay, which defaults to 3ms in blk-settings.c.  */
int dm_io(struct dm_io_request *io_req, unsigned num_regions, struct dm_io_region *where, unsigned long *sync_error_bits)
/* If the IO is asynchronous (i.e. it has notify.fn), you must either unplug the queue with blk_unplug() some time later or set the BIO_RW_SYNC bit in io_req->bi_rw. If you fail to do one of these, the IO will be submitted to the disk after q->unplug_delay, which defaults to 3ms in blk-settings.c.  */
int dm_io(struct dm_io_request *io_req, unsigned num_regions, struct dm_io_region *where, unsigned long *sync_error_bits)
{
	int r;
	struct dpages dp;
	r = dp_init(io_req, &dp);
	if (r)
		return r;
	if (!io_req->notify.fn)
		return sync_io(io_req->client, num_regions, where,
			       io_req->bi_rw, &dp, sync_error_bits);
	return async_io(io_req->client, num_regions, where, io_req->bi_rw,
			&dp, io_req->notify.fn, io_req->notify.context);
}