diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:47:48 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 17:55:51 -0400 |
commit | 30fd150202fb2d08a62f9c2966a4b1fcf2e861e7 (patch) | |
tree | 23a2944351573e9982c4bb3d97a6844b46fee8f4 | |
parent | 325a64860472765ecaeaa0081e9ddd67671183d4 (diff) |
xen/blkback: Change structure name blkif_st to xen_blkif.
No need for that '_st' and xen_blkif is more apt.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-rw-r--r-- | drivers/block/xen-blkback/blkback.c | 28 | ||||
-rw-r--r-- | drivers/block/xen-blkback/common.h | 2 | ||||
-rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 24 |
3 files changed, 27 insertions, 27 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index d06eb6a50d57..d438781ecc7c 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c | |||
@@ -71,7 +71,7 @@ module_param(log_stats, int, 0644); | |||
71 | * response queued for it, with the saved 'id' passed back. | 71 | * response queued for it, with the saved 'id' passed back. |
72 | */ | 72 | */ |
73 | struct pending_req { | 73 | struct pending_req { |
74 | struct blkif_st *blkif; | 74 | struct xen_blkif *blkif; |
75 | u64 id; | 75 | u64 id; |
76 | int nr_pages; | 76 | int nr_pages; |
77 | atomic_t pendcnt; | 77 | atomic_t pendcnt; |
@@ -121,11 +121,11 @@ static inline unsigned long vaddr(struct pending_req *req, int seg) | |||
121 | (blkbk->pending_grant_handles[vaddr_pagenr(_req, _seg)]) | 121 | (blkbk->pending_grant_handles[vaddr_pagenr(_req, _seg)]) |
122 | 122 | ||
123 | 123 | ||
124 | static int do_block_io_op(struct blkif_st *blkif); | 124 | static int do_block_io_op(struct xen_blkif *blkif); |
125 | static int dispatch_rw_block_io(struct blkif_st *blkif, | 125 | static int dispatch_rw_block_io(struct xen_blkif *blkif, |
126 | struct blkif_request *req, | 126 | struct blkif_request *req, |
127 | struct pending_req *pending_req); | 127 | struct pending_req *pending_req); |
128 | static void make_response(struct blkif_st *blkif, u64 id, | 128 | static void make_response(struct xen_blkif *blkif, u64 id, |
129 | unsigned short op, int st); | 129 | unsigned short op, int st); |
130 | 130 | ||
131 | /* | 131 | /* |
@@ -166,7 +166,7 @@ static void free_req(struct pending_req *req) | |||
166 | /* | 166 | /* |
167 | * Routines for managing virtual block devices (vbds). | 167 | * Routines for managing virtual block devices (vbds). |
168 | */ | 168 | */ |
169 | static int vbd_translate(struct phys_req *req, struct blkif_st *blkif, | 169 | static int vbd_translate(struct phys_req *req, struct xen_blkif *blkif, |
170 | int operation) | 170 | int operation) |
171 | { | 171 | { |
172 | struct vbd *vbd = &blkif->vbd; | 172 | struct vbd *vbd = &blkif->vbd; |
@@ -186,7 +186,7 @@ static int vbd_translate(struct phys_req *req, struct blkif_st *blkif, | |||
186 | return rc; | 186 | return rc; |
187 | } | 187 | } |
188 | 188 | ||
189 | static void vbd_resize(struct blkif_st *blkif) | 189 | static void vbd_resize(struct xen_blkif *blkif) |
190 | { | 190 | { |
191 | struct vbd *vbd = &blkif->vbd; | 191 | struct vbd *vbd = &blkif->vbd; |
192 | struct xenbus_transaction xbt; | 192 | struct xenbus_transaction xbt; |
@@ -233,7 +233,7 @@ abort: | |||
233 | /* | 233 | /* |
234 | * Notification from the guest OS. | 234 | * Notification from the guest OS. |
235 | */ | 235 | */ |
236 | static void blkif_notify_work(struct blkif_st *blkif) | 236 | static void blkif_notify_work(struct xen_blkif *blkif) |
237 | { | 237 | { |
238 | blkif->waiting_reqs = 1; | 238 | blkif->waiting_reqs = 1; |
239 | wake_up(&blkif->wq); | 239 | wake_up(&blkif->wq); |
@@ -249,7 +249,7 @@ irqreturn_t xen_blkif_be_int(int irq, void *dev_id) | |||
249 | * SCHEDULER FUNCTIONS | 249 | * SCHEDULER FUNCTIONS |
250 | */ | 250 | */ |
251 | 251 | ||
252 | static void print_stats(struct blkif_st *blkif) | 252 | static void print_stats(struct xen_blkif *blkif) |
253 | { | 253 | { |
254 | pr_debug("xen-blkback (%s): oo %3d | rd %4d | wr %4d | f %4d\n", | 254 | pr_debug("xen-blkback (%s): oo %3d | rd %4d | wr %4d | f %4d\n", |
255 | current->comm, blkif->st_oo_req, | 255 | current->comm, blkif->st_oo_req, |
@@ -262,7 +262,7 @@ static void print_stats(struct blkif_st *blkif) | |||
262 | 262 | ||
263 | int xen_blkif_schedule(void *arg) | 263 | int xen_blkif_schedule(void *arg) |
264 | { | 264 | { |
265 | struct blkif_st *blkif = arg; | 265 | struct xen_blkif *blkif = arg; |
266 | struct vbd *vbd = &blkif->vbd; | 266 | struct vbd *vbd = &blkif->vbd; |
267 | 267 | ||
268 | xen_blkif_get(blkif); | 268 | xen_blkif_get(blkif); |
@@ -451,7 +451,7 @@ static void end_block_io_op(struct bio *bio, int error) | |||
451 | * (which has the sectors we want, number of them, grant references, etc), | 451 | * (which has the sectors we want, number of them, grant references, etc), |
452 | * and transmute it to the block API to hand it over to the proper block disk. | 452 | * and transmute it to the block API to hand it over to the proper block disk. |
453 | */ | 453 | */ |
454 | static int do_block_io_op(struct blkif_st *blkif) | 454 | static int do_block_io_op(struct xen_blkif *blkif) |
455 | { | 455 | { |
456 | union blkif_back_rings *blk_rings = &blkif->blk_rings; | 456 | union blkif_back_rings *blk_rings = &blkif->blk_rings; |
457 | struct blkif_request req; | 457 | struct blkif_request req; |
@@ -512,9 +512,9 @@ static int do_block_io_op(struct blkif_st *blkif) | |||
512 | * Transmutation of the 'struct blkif_request' to a proper 'struct bio' | 512 | * Transmutation of the 'struct blkif_request' to a proper 'struct bio' |
513 | * and call the 'submit_bio' to pass it to the underlying storage. | 513 | * and call the 'submit_bio' to pass it to the underlying storage. |
514 | */ | 514 | */ |
515 | static int dispatch_rw_block_io(struct blkif_st *blkif, | 515 | static int dispatch_rw_block_io(struct xen_blkif *blkif, |
516 | struct blkif_request *req, | 516 | struct blkif_request *req, |
517 | struct pending_req *pending_req) | 517 | struct pending_req *pending_req) |
518 | { | 518 | { |
519 | struct phys_req preq; | 519 | struct phys_req preq; |
520 | struct seg_buf seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; | 520 | struct seg_buf seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; |
@@ -692,7 +692,7 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, | |||
692 | /* | 692 | /* |
693 | * Put a response on the ring on how the operation fared. | 693 | * Put a response on the ring on how the operation fared. |
694 | */ | 694 | */ |
695 | static void make_response(struct blkif_st *blkif, u64 id, | 695 | static void make_response(struct xen_blkif *blkif, u64 id, |
696 | unsigned short op, int st) | 696 | unsigned short op, int st) |
697 | { | 697 | { |
698 | struct blkif_response resp; | 698 | struct blkif_response resp; |
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index b0db6aabb5b8..722c048663d6 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h | |||
@@ -130,7 +130,7 @@ struct vbd { | |||
130 | 130 | ||
131 | struct backend_info; | 131 | struct backend_info; |
132 | 132 | ||
133 | struct blkif_st { | 133 | struct xen_blkif { |
134 | /* Unique identifier for this interface. */ | 134 | /* Unique identifier for this interface. */ |
135 | domid_t domid; | 135 | domid_t domid; |
136 | unsigned int handle; | 136 | unsigned int handle; |
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index ba8d30662d19..f355f7a5d52d 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | struct backend_info { | 24 | struct backend_info { |
25 | struct xenbus_device *dev; | 25 | struct xenbus_device *dev; |
26 | struct blkif_st *blkif; | 26 | struct xen_blkif *blkif; |
27 | struct xenbus_watch backend_watch; | 27 | struct xenbus_watch backend_watch; |
28 | unsigned major; | 28 | unsigned major; |
29 | unsigned minor; | 29 | unsigned minor; |
@@ -41,7 +41,7 @@ struct xenbus_device *xen_blkbk_xenbus(struct backend_info *be) | |||
41 | return be->dev; | 41 | return be->dev; |
42 | } | 42 | } |
43 | 43 | ||
44 | static int blkback_name(struct blkif_st *blkif, char *buf) | 44 | static int blkback_name(struct xen_blkif *blkif, char *buf) |
45 | { | 45 | { |
46 | char *devpath, *devname; | 46 | char *devpath, *devname; |
47 | struct xenbus_device *dev = blkif->be->dev; | 47 | struct xenbus_device *dev = blkif->be->dev; |
@@ -62,7 +62,7 @@ static int blkback_name(struct blkif_st *blkif, char *buf) | |||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | static void xen_update_blkif_status(struct blkif_st *blkif) | 65 | static void xen_update_blkif_status(struct xen_blkif *blkif) |
66 | { | 66 | { |
67 | int err; | 67 | int err; |
68 | char name[TASK_COMM_LEN]; | 68 | char name[TASK_COMM_LEN]; |
@@ -101,9 +101,9 @@ static void xen_update_blkif_status(struct blkif_st *blkif) | |||
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | static struct blkif_st *xen_blkif_alloc(domid_t domid) | 104 | static struct xen_blkif *xen_blkif_alloc(domid_t domid) |
105 | { | 105 | { |
106 | struct blkif_st *blkif; | 106 | struct xen_blkif *blkif; |
107 | 107 | ||
108 | blkif = kmem_cache_alloc(xen_blkif_cachep, GFP_KERNEL); | 108 | blkif = kmem_cache_alloc(xen_blkif_cachep, GFP_KERNEL); |
109 | if (!blkif) | 109 | if (!blkif) |
@@ -120,7 +120,7 @@ static struct blkif_st *xen_blkif_alloc(domid_t domid) | |||
120 | return blkif; | 120 | return blkif; |
121 | } | 121 | } |
122 | 122 | ||
123 | static int map_frontend_page(struct blkif_st *blkif, unsigned long shared_page) | 123 | static int map_frontend_page(struct xen_blkif *blkif, unsigned long shared_page) |
124 | { | 124 | { |
125 | struct gnttab_map_grant_ref op; | 125 | struct gnttab_map_grant_ref op; |
126 | 126 | ||
@@ -141,7 +141,7 @@ static int map_frontend_page(struct blkif_st *blkif, unsigned long shared_page) | |||
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
143 | 143 | ||
144 | static void unmap_frontend_page(struct blkif_st *blkif) | 144 | static void unmap_frontend_page(struct xen_blkif *blkif) |
145 | { | 145 | { |
146 | struct gnttab_unmap_grant_ref op; | 146 | struct gnttab_unmap_grant_ref op; |
147 | 147 | ||
@@ -152,7 +152,7 @@ static void unmap_frontend_page(struct blkif_st *blkif) | |||
152 | BUG(); | 152 | BUG(); |
153 | } | 153 | } |
154 | 154 | ||
155 | static int xen_blkif_map(struct blkif_st *blkif, unsigned long shared_page, | 155 | static int xen_blkif_map(struct xen_blkif *blkif, unsigned long shared_page, |
156 | unsigned int evtchn) | 156 | unsigned int evtchn) |
157 | { | 157 | { |
158 | int err; | 158 | int err; |
@@ -211,7 +211,7 @@ static int xen_blkif_map(struct blkif_st *blkif, unsigned long shared_page, | |||
211 | return 0; | 211 | return 0; |
212 | } | 212 | } |
213 | 213 | ||
214 | static void xen_blkif_disconnect(struct blkif_st *blkif) | 214 | static void xen_blkif_disconnect(struct xen_blkif *blkif) |
215 | { | 215 | { |
216 | if (blkif->xenblkd) { | 216 | if (blkif->xenblkd) { |
217 | kthread_stop(blkif->xenblkd); | 217 | kthread_stop(blkif->xenblkd); |
@@ -234,7 +234,7 @@ static void xen_blkif_disconnect(struct blkif_st *blkif) | |||
234 | } | 234 | } |
235 | } | 235 | } |
236 | 236 | ||
237 | void xen_blkif_free(struct blkif_st *blkif) | 237 | void xen_blkif_free(struct xen_blkif *blkif) |
238 | { | 238 | { |
239 | if (!atomic_dec_and_test(&blkif->refcnt)) | 239 | if (!atomic_dec_and_test(&blkif->refcnt)) |
240 | BUG(); | 240 | BUG(); |
@@ -244,7 +244,7 @@ void xen_blkif_free(struct blkif_st *blkif) | |||
244 | int __init xen_blkif_interface_init(void) | 244 | int __init xen_blkif_interface_init(void) |
245 | { | 245 | { |
246 | xen_blkif_cachep = kmem_cache_create("blkif_cache", | 246 | xen_blkif_cachep = kmem_cache_create("blkif_cache", |
247 | sizeof(struct blkif_st), | 247 | sizeof(struct xen_blkif), |
248 | 0, 0, NULL); | 248 | 0, 0, NULL); |
249 | if (!xen_blkif_cachep) | 249 | if (!xen_blkif_cachep) |
250 | return -ENOMEM; | 250 | return -ENOMEM; |
@@ -332,7 +332,7 @@ static void vbd_free(struct vbd *vbd) | |||
332 | vbd->bdev = NULL; | 332 | vbd->bdev = NULL; |
333 | } | 333 | } |
334 | 334 | ||
335 | static int vbd_create(struct blkif_st *blkif, blkif_vdev_t handle, | 335 | static int vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle, |
336 | unsigned major, unsigned minor, int readonly, | 336 | unsigned major, unsigned minor, int readonly, |
337 | int cdrom) | 337 | int cdrom) |
338 | { | 338 | { |