Commit 30fd1502 authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk

xen/blkback: Change structure name blkif_st to xen_blkif.

No need for that '_st' and xen_blkif is more apt.
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 325a6486
...@@ -71,7 +71,7 @@ module_param(log_stats, int, 0644); ...@@ -71,7 +71,7 @@ module_param(log_stats, int, 0644);
* response queued for it, with the saved 'id' passed back. * response queued for it, with the saved 'id' passed back.
*/ */
struct pending_req { struct pending_req {
struct blkif_st *blkif; struct xen_blkif *blkif;
u64 id; u64 id;
int nr_pages; int nr_pages;
atomic_t pendcnt; atomic_t pendcnt;
...@@ -121,11 +121,11 @@ static inline unsigned long vaddr(struct pending_req *req, int seg) ...@@ -121,11 +121,11 @@ static inline unsigned long vaddr(struct pending_req *req, int seg)
(blkbk->pending_grant_handles[vaddr_pagenr(_req, _seg)]) (blkbk->pending_grant_handles[vaddr_pagenr(_req, _seg)])
static int do_block_io_op(struct blkif_st *blkif); static int do_block_io_op(struct xen_blkif *blkif);
static int dispatch_rw_block_io(struct blkif_st *blkif, static int dispatch_rw_block_io(struct xen_blkif *blkif,
struct blkif_request *req, struct blkif_request *req,
struct pending_req *pending_req); struct pending_req *pending_req);
static void make_response(struct blkif_st *blkif, u64 id, static void make_response(struct xen_blkif *blkif, u64 id,
unsigned short op, int st); unsigned short op, int st);
/* /*
...@@ -166,7 +166,7 @@ static void free_req(struct pending_req *req) ...@@ -166,7 +166,7 @@ static void free_req(struct pending_req *req)
/* /*
* Routines for managing virtual block devices (vbds). * Routines for managing virtual block devices (vbds).
*/ */
static int vbd_translate(struct phys_req *req, struct blkif_st *blkif, static int vbd_translate(struct phys_req *req, struct xen_blkif *blkif,
int operation) int operation)
{ {
struct vbd *vbd = &blkif->vbd; struct vbd *vbd = &blkif->vbd;
...@@ -186,7 +186,7 @@ static int vbd_translate(struct phys_req *req, struct blkif_st *blkif, ...@@ -186,7 +186,7 @@ static int vbd_translate(struct phys_req *req, struct blkif_st *blkif,
return rc; return rc;
} }
static void vbd_resize(struct blkif_st *blkif) static void vbd_resize(struct xen_blkif *blkif)
{ {
struct vbd *vbd = &blkif->vbd; struct vbd *vbd = &blkif->vbd;
struct xenbus_transaction xbt; struct xenbus_transaction xbt;
...@@ -233,7 +233,7 @@ static void vbd_resize(struct blkif_st *blkif) ...@@ -233,7 +233,7 @@ static void vbd_resize(struct blkif_st *blkif)
/* /*
* Notification from the guest OS. * Notification from the guest OS.
*/ */
static void blkif_notify_work(struct blkif_st *blkif) static void blkif_notify_work(struct xen_blkif *blkif)
{ {
blkif->waiting_reqs = 1; blkif->waiting_reqs = 1;
wake_up(&blkif->wq); wake_up(&blkif->wq);
...@@ -249,7 +249,7 @@ irqreturn_t xen_blkif_be_int(int irq, void *dev_id) ...@@ -249,7 +249,7 @@ irqreturn_t xen_blkif_be_int(int irq, void *dev_id)
* SCHEDULER FUNCTIONS * SCHEDULER FUNCTIONS
*/ */
static void print_stats(struct blkif_st *blkif) static void print_stats(struct xen_blkif *blkif)
{ {
pr_debug("xen-blkback (%s): oo %3d | rd %4d | wr %4d | f %4d\n", pr_debug("xen-blkback (%s): oo %3d | rd %4d | wr %4d | f %4d\n",
current->comm, blkif->st_oo_req, current->comm, blkif->st_oo_req,
...@@ -262,7 +262,7 @@ static void print_stats(struct blkif_st *blkif) ...@@ -262,7 +262,7 @@ static void print_stats(struct blkif_st *blkif)
int xen_blkif_schedule(void *arg) int xen_blkif_schedule(void *arg)
{ {
struct blkif_st *blkif = arg; struct xen_blkif *blkif = arg;
struct vbd *vbd = &blkif->vbd; struct vbd *vbd = &blkif->vbd;
xen_blkif_get(blkif); xen_blkif_get(blkif);
...@@ -451,7 +451,7 @@ static void end_block_io_op(struct bio *bio, int error) ...@@ -451,7 +451,7 @@ static void end_block_io_op(struct bio *bio, int error)
* (which has the sectors we want, number of them, grant references, etc), * (which has the sectors we want, number of them, grant references, etc),
* and transmute it to the block API to hand it over to the proper block disk. * and transmute it to the block API to hand it over to the proper block disk.
*/ */
static int do_block_io_op(struct blkif_st *blkif) static int do_block_io_op(struct xen_blkif *blkif)
{ {
union blkif_back_rings *blk_rings = &blkif->blk_rings; union blkif_back_rings *blk_rings = &blkif->blk_rings;
struct blkif_request req; struct blkif_request req;
...@@ -512,7 +512,7 @@ static int do_block_io_op(struct blkif_st *blkif) ...@@ -512,7 +512,7 @@ static int do_block_io_op(struct blkif_st *blkif)
* Transmutation of the 'struct blkif_request' to a proper 'struct bio' * Transmutation of the 'struct blkif_request' to a proper 'struct bio'
* and call the 'submit_bio' to pass it to the underlying storage. * and call the 'submit_bio' to pass it to the underlying storage.
*/ */
static int dispatch_rw_block_io(struct blkif_st *blkif, static int dispatch_rw_block_io(struct xen_blkif *blkif,
struct blkif_request *req, struct blkif_request *req,
struct pending_req *pending_req) struct pending_req *pending_req)
{ {
...@@ -692,7 +692,7 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, ...@@ -692,7 +692,7 @@ static int dispatch_rw_block_io(struct blkif_st *blkif,
/* /*
* Put a response on the ring on how the operation fared. * Put a response on the ring on how the operation fared.
*/ */
static void make_response(struct blkif_st *blkif, u64 id, static void make_response(struct xen_blkif *blkif, u64 id,
unsigned short op, int st) unsigned short op, int st)
{ {
struct blkif_response resp; struct blkif_response resp;
......
...@@ -130,7 +130,7 @@ struct vbd { ...@@ -130,7 +130,7 @@ struct vbd {
struct backend_info; struct backend_info;
struct blkif_st { struct xen_blkif {
/* Unique identifier for this interface. */ /* Unique identifier for this interface. */
domid_t domid; domid_t domid;
unsigned int handle; unsigned int handle;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
struct backend_info { struct backend_info {
struct xenbus_device *dev; struct xenbus_device *dev;
struct blkif_st *blkif; struct xen_blkif *blkif;
struct xenbus_watch backend_watch; struct xenbus_watch backend_watch;
unsigned major; unsigned major;
unsigned minor; unsigned minor;
...@@ -41,7 +41,7 @@ struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be) ...@@ -41,7 +41,7 @@ struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be)
return be->dev; return be->dev;
} }
static int blkback_name(struct blkif_st *blkif, char *buf) static int blkback_name(struct xen_blkif *blkif, char *buf)
{ {
char *devpath, *devname; char *devpath, *devname;
struct xenbus_device *dev = blkif->be->dev; struct xenbus_device *dev = blkif->be->dev;
...@@ -62,7 +62,7 @@ static int blkback_name(struct blkif_st *blkif, char *buf) ...@@ -62,7 +62,7 @@ static int blkback_name(struct blkif_st *blkif, char *buf)
return 0; return 0;
} }
static void xen_update_blkif_status(struct blkif_st *blkif) static void xen_update_blkif_status(struct xen_blkif *blkif)
{ {
int err; int err;
char name[TASK_COMM_LEN]; char name[TASK_COMM_LEN];
...@@ -101,9 +101,9 @@ static void xen_update_blkif_status(struct blkif_st *blkif) ...@@ -101,9 +101,9 @@ static void xen_update_blkif_status(struct blkif_st *blkif)
} }
} }
static struct blkif_st *xen_blkif_alloc(domid_t domid) static struct xen_blkif *xen_blkif_alloc(domid_t domid)
{ {
struct blkif_st *blkif; struct xen_blkif *blkif;
blkif = kmem_cache_alloc(xen_blkif_cachep, GFP_KERNEL); blkif = kmem_cache_alloc(xen_blkif_cachep, GFP_KERNEL);
if (!blkif) if (!blkif)
...@@ -120,7 +120,7 @@ static struct blkif_st *xen_blkif_alloc(domid_t domid) ...@@ -120,7 +120,7 @@ static struct blkif_st *xen_blkif_alloc(domid_t domid)
return blkif; return blkif;
} }
static int map_frontend_page(struct blkif_st *blkif, unsigned long shared_page) static int map_frontend_page(struct xen_blkif *blkif, unsigned long shared_page)
{ {
struct gnttab_map_grant_ref op; struct gnttab_map_grant_ref op;
...@@ -141,7 +141,7 @@ static int map_frontend_page(struct blkif_st *blkif, unsigned long shared_page) ...@@ -141,7 +141,7 @@ static int map_frontend_page(struct blkif_st *blkif, unsigned long shared_page)
return 0; return 0;
} }
static void unmap_frontend_page(struct blkif_st *blkif) static void unmap_frontend_page(struct xen_blkif *blkif)
{ {
struct gnttab_unmap_grant_ref op; struct gnttab_unmap_grant_ref op;
...@@ -152,7 +152,7 @@ static void unmap_frontend_page(struct blkif_st *blkif) ...@@ -152,7 +152,7 @@ static void unmap_frontend_page(struct blkif_st *blkif)
BUG(); BUG();
} }
static int xen_blkif_map(struct blkif_st *blkif, unsigned long shared_page, static int xen_blkif_map(struct xen_blkif *blkif, unsigned long shared_page,
unsigned int evtchn) unsigned int evtchn)
{ {
int err; int err;
...@@ -211,7 +211,7 @@ static int xen_blkif_map(struct blkif_st *blkif, unsigned long shared_page, ...@@ -211,7 +211,7 @@ static int xen_blkif_map(struct blkif_st *blkif, unsigned long shared_page,
return 0; return 0;
} }
static void xen_blkif_disconnect(struct blkif_st *blkif) static void xen_blkif_disconnect(struct xen_blkif *blkif)
{ {
if (blkif->xenblkd) { if (blkif->xenblkd) {
kthread_stop(blkif->xenblkd); kthread_stop(blkif->xenblkd);
...@@ -234,7 +234,7 @@ static void xen_blkif_disconnect(struct blkif_st *blkif) ...@@ -234,7 +234,7 @@ static void xen_blkif_disconnect(struct blkif_st *blkif)
} }
} }
void xen_blkif_free(struct blkif_st *blkif) void xen_blkif_free(struct xen_blkif *blkif)
{ {
if (!atomic_dec_and_test(&blkif->refcnt)) if (!atomic_dec_and_test(&blkif->refcnt))
BUG(); BUG();
...@@ -244,7 +244,7 @@ void xen_blkif_free(struct blkif_st *blkif) ...@@ -244,7 +244,7 @@ void xen_blkif_free(struct blkif_st *blkif)
int __init xen_blkif_interface_init(void) int __init xen_blkif_interface_init(void)
{ {
xen_blkif_cachep = kmem_cache_create("blkif_cache", xen_blkif_cachep = kmem_cache_create("blkif_cache",
sizeof(struct blkif_st), sizeof(struct xen_blkif),
0, 0, NULL); 0, 0, NULL);
if (!xen_blkif_cachep) if (!xen_blkif_cachep)
return -ENOMEM; return -ENOMEM;
...@@ -332,7 +332,7 @@ static void vbd_free(struct vbd *vbd) ...@@ -332,7 +332,7 @@ static void vbd_free(struct vbd *vbd)
vbd->bdev = NULL; vbd->bdev = NULL;
} }
static int vbd_create(struct blkif_st *blkif, blkif_vdev_t handle, static int vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
unsigned major, unsigned minor, int readonly, unsigned major, unsigned minor, int readonly,
int cdrom) int cdrom)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment