#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/pagemap.h>
#include <xen/events.h>
#include <xen/grant_table.h>
#include "common.h"
#define RINGREF_NAME_LEN …
struct backend_info { … };
static struct kmem_cache *xen_blkif_cachep;
static void connect(struct backend_info *);
static int connect_ring(struct backend_info *);
static void backend_changed(struct xenbus_watch *, const char *,
const char *);
static void xen_blkif_free(struct xen_blkif *blkif);
static void xen_vbd_free(struct xen_vbd *vbd);
struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be)
{ … }
static void xen_blkif_deferred_free(struct work_struct *work)
{ … }
static int blkback_name(struct xen_blkif *blkif, char *buf)
{ … }
static void xen_update_blkif_status(struct xen_blkif *blkif)
{ … }
static int xen_blkif_alloc_rings(struct xen_blkif *blkif)
{ … }
static bool feature_persistent = …;
module_param(feature_persistent, bool, 0644);
MODULE_PARM_DESC(…) …;
static struct xen_blkif *xen_blkif_alloc(domid_t domid)
{ … }
static int xen_blkif_map(struct xen_blkif_ring *ring, grant_ref_t *gref,
unsigned int nr_grefs, unsigned int evtchn)
{ … }
static int xen_blkif_disconnect(struct xen_blkif *blkif)
{ … }
static void xen_blkif_free(struct xen_blkif *blkif)
{ … }
int __init xen_blkif_interface_init(void)
{ … }
void xen_blkif_interface_fini(void)
{ … }
#define VBD_SHOW_ALLRING(name, format) …
VBD_SHOW_ALLRING(…);
VBD_SHOW_ALLRING(…);
VBD_SHOW_ALLRING(…);
VBD_SHOW_ALLRING(…);
VBD_SHOW_ALLRING(…);
VBD_SHOW_ALLRING(…);
VBD_SHOW_ALLRING(…);
static struct attribute *xen_vbdstat_attrs[] = …;
static const struct attribute_group xen_vbdstat_group = …;
#define VBD_SHOW(name, format, args...) …
VBD_SHOW(…);
VBD_SHOW(…);
static int xenvbd_sysfs_addif(struct xenbus_device *dev)
{ … }
static void xenvbd_sysfs_delif(struct xenbus_device *dev)
{ … }
static void xen_vbd_free(struct xen_vbd *vbd)
{ … }
static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
unsigned major, unsigned minor, int readonly,
int cdrom)
{ … }
static void xen_blkbk_remove(struct xenbus_device *dev)
{ … }
int xen_blkbk_flush_diskcache(struct xenbus_transaction xbt,
struct backend_info *be, int state)
{ … }
static void xen_blkbk_discard(struct xenbus_transaction xbt, struct backend_info *be)
{ … }
int xen_blkbk_barrier(struct xenbus_transaction xbt,
struct backend_info *be, int state)
{ … }
static int xen_blkbk_probe(struct xenbus_device *dev,
const struct xenbus_device_id *id)
{ … }
static void backend_changed(struct xenbus_watch *watch,
const char *path, const char *token)
{ … }
static void frontend_changed(struct xenbus_device *dev,
enum xenbus_state frontend_state)
{ … }
static unsigned int buffer_squeeze_duration_ms = …;
module_param_named(buffer_squeeze_duration_ms,
buffer_squeeze_duration_ms, int, 0644);
MODULE_PARM_DESC(…) …;
static void reclaim_memory(struct xenbus_device *dev)
{ … }
static void connect(struct backend_info *be)
{ … }
static int read_per_ring_refs(struct xen_blkif_ring *ring, const char *dir)
{ … }
static int connect_ring(struct backend_info *be)
{ … }
static const struct xenbus_device_id xen_blkbk_ids[] = …;
static struct xenbus_driver xen_blkbk_driver = …;
int xen_blkif_xenbus_init(void)
{ … }
void xen_blkif_xenbus_fini(void)
{ … }