aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-04-15 11:50:34 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-04-15 11:50:34 -0400
commit9f3aedf573dd034d59e7eb6c4ee97648d5be8fc6 (patch)
treeb3011c6869e7a6274c91ed8a7d6919f66196a996 /drivers
parent976222e05ea5a9959ccf880d7a24efbf79b3c6cf (diff)
xen/blkback: Change fast_flush_area to xen_blkbk_unmap, and tweak xen_blk_map_seg.
The previous name ('fast_flush_area') had nothing to do with what it does right now. Changing the names so that the code dealing with mapping pages in and out of the guest is called xen_blkbk_[map|unmap]. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/blkback/blkback.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c
index 9598e0fd0f9e..c645c83f900b 100644
--- a/drivers/xen/blkback/blkback.c
+++ b/drivers/xen/blkback/blkback.c
@@ -249,7 +249,7 @@ struct seg_buf {
249 * Unmap the grant references, and also remove the M2P over-rides 249 * Unmap the grant references, and also remove the M2P over-rides
250 * used in the 'pending_req'. 250 * used in the 'pending_req'.
251*/ 251*/
252static void fast_flush_area(struct pending_req *req) 252static void xen_blkbk_unmap(struct pending_req *req)
253{ 253{
254 struct gnttab_unmap_grant_ref unmap[BLKIF_MAX_SEGMENTS_PER_REQUEST]; 254 struct gnttab_unmap_grant_ref unmap[BLKIF_MAX_SEGMENTS_PER_REQUEST];
255 unsigned int i, invcount = 0; 255 unsigned int i, invcount = 0;
@@ -282,8 +282,8 @@ static void fast_flush_area(struct pending_req *req)
282 } 282 }
283 } 283 }
284} 284}
285static int xen_blk_map_buf(struct blkif_request *req, struct pending_req *pending_req, 285static int xen_blkbk_map(struct blkif_request *req, struct pending_req *pending_req,
286 struct seg_buf seg[]) 286 struct seg_buf seg[])
287{ 287{
288 struct gnttab_map_grant_ref map[BLKIF_MAX_SEGMENTS_PER_REQUEST]; 288 struct gnttab_map_grant_ref map[BLKIF_MAX_SEGMENTS_PER_REQUEST];
289 int i; 289 int i;
@@ -361,7 +361,7 @@ static void __end_block_io_op(struct pending_req *pending_req, int error)
361 * the proper response on the ring. 361 * the proper response on the ring.
362 */ 362 */
363 if (atomic_dec_and_test(&pending_req->pendcnt)) { 363 if (atomic_dec_and_test(&pending_req->pendcnt)) {
364 fast_flush_area(pending_req); 364 xen_blkbk_unmap(pending_req);
365 make_response(pending_req->blkif, pending_req->id, 365 make_response(pending_req->blkif, pending_req->id,
366 pending_req->operation, pending_req->status); 366 pending_req->operation, pending_req->status);
367 blkif_put(pending_req->blkif); 367 blkif_put(pending_req->blkif);
@@ -540,9 +540,9 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
540 /* If we have failed at this point, we need to undo the M2P override, 540 /* If we have failed at this point, we need to undo the M2P override,
541 * set gnttab_set_unmap_op on all of the grant references and perform 541 * set gnttab_set_unmap_op on all of the grant references and perform
542 * the hypercall to unmap the grants - that is all done in 542 * the hypercall to unmap the grants - that is all done in
543 * fast_flush_area. 543 * xen_blkbk_unmap.
544 */ 544 */
545 if (xen_blk_map_buf(req, pending_req, seg)) 545 if (xen_blkbk_map(req, pending_req, seg))
546 goto fail_flush; 546 goto fail_flush;
547 547
548 /* This corresponding blkif_put is done in __end_block_io_op */ 548 /* This corresponding blkif_put is done in __end_block_io_op */
@@ -606,7 +606,7 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
606 return; 606 return;
607 607
608 fail_flush: 608 fail_flush:
609 fast_flush_area(pending_req); 609 xen_blkbk_unmap(pending_req);
610 fail_response: 610 fail_response:
611 /* Haven't submitted any bio's yet. */ 611 /* Haven't submitted any bio's yet. */
612 make_response(blkif, req->id, req->operation, BLKIF_RSP_ERROR); 612 make_response(blkif, req->id, req->operation, BLKIF_RSP_ERROR);