diff options
author | Julien Grall <julien.grall@linaro.org> | 2015-06-17 10:28:08 -0400 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-06-17 11:35:19 -0400 |
commit | 6684fa1cdb1ebe804e9707f389255d461b2e95b0 (patch) | |
tree | 3ffde0c1aa4dbe3d92608505e4c7a594a767fb8e | |
parent | ee4b7179fc9bf19fd22f9d17757a86582c40229e (diff) |
block/xen-blkback: s/nr_pages/nr_segs/
Make the code less confusing to read now that Linux may not have the
same page size as Xen.
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r-- | drivers/block/xen-blkback/blkback.c | 10 | ||||
-rw-r--r-- | drivers/block/xen-blkback/common.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 713fc9ff1149..7049528b3509 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c | |||
@@ -729,7 +729,7 @@ static void xen_blkbk_unmap_and_respond(struct pending_req *req) | |||
729 | struct grant_page **pages = req->segments; | 729 | struct grant_page **pages = req->segments; |
730 | unsigned int invcount; | 730 | unsigned int invcount; |
731 | 731 | ||
732 | invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_pages, | 732 | invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_segs, |
733 | req->unmap, req->unmap_pages); | 733 | req->unmap, req->unmap_pages); |
734 | 734 | ||
735 | work->data = req; | 735 | work->data = req; |
@@ -915,7 +915,7 @@ static int xen_blkbk_map_seg(struct pending_req *pending_req) | |||
915 | int rc; | 915 | int rc; |
916 | 916 | ||
917 | rc = xen_blkbk_map(pending_req->blkif, pending_req->segments, | 917 | rc = xen_blkbk_map(pending_req->blkif, pending_req->segments, |
918 | pending_req->nr_pages, | 918 | pending_req->nr_segs, |
919 | (pending_req->operation != BLKIF_OP_READ)); | 919 | (pending_req->operation != BLKIF_OP_READ)); |
920 | 920 | ||
921 | return rc; | 921 | return rc; |
@@ -931,7 +931,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req, | |||
931 | int indirect_grefs, rc, n, nseg, i; | 931 | int indirect_grefs, rc, n, nseg, i; |
932 | struct blkif_request_segment *segments = NULL; | 932 | struct blkif_request_segment *segments = NULL; |
933 | 933 | ||
934 | nseg = pending_req->nr_pages; | 934 | nseg = pending_req->nr_segs; |
935 | indirect_grefs = INDIRECT_PAGES(nseg); | 935 | indirect_grefs = INDIRECT_PAGES(nseg); |
936 | BUG_ON(indirect_grefs > BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST); | 936 | BUG_ON(indirect_grefs > BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST); |
937 | 937 | ||
@@ -1251,7 +1251,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, | |||
1251 | pending_req->id = req->u.rw.id; | 1251 | pending_req->id = req->u.rw.id; |
1252 | pending_req->operation = req_operation; | 1252 | pending_req->operation = req_operation; |
1253 | pending_req->status = BLKIF_RSP_OKAY; | 1253 | pending_req->status = BLKIF_RSP_OKAY; |
1254 | pending_req->nr_pages = nseg; | 1254 | pending_req->nr_segs = nseg; |
1255 | 1255 | ||
1256 | if (req->operation != BLKIF_OP_INDIRECT) { | 1256 | if (req->operation != BLKIF_OP_INDIRECT) { |
1257 | preq.dev = req->u.rw.handle; | 1257 | preq.dev = req->u.rw.handle; |
@@ -1372,7 +1372,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, | |||
1372 | 1372 | ||
1373 | fail_flush: | 1373 | fail_flush: |
1374 | xen_blkbk_unmap(blkif, pending_req->segments, | 1374 | xen_blkbk_unmap(blkif, pending_req->segments, |
1375 | pending_req->nr_pages); | 1375 | pending_req->nr_segs); |
1376 | fail_response: | 1376 | fail_response: |
1377 | /* Haven't submitted any bio's yet. */ | 1377 | /* Haven't submitted any bio's yet. */ |
1378 | make_response(blkif, req->u.rw.id, req_operation, BLKIF_RSP_ERROR); | 1378 | make_response(blkif, req->u.rw.id, req_operation, BLKIF_RSP_ERROR); |
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index f620b5d3f77c..7a03e07f52f3 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h | |||
@@ -343,7 +343,7 @@ struct grant_page { | |||
343 | struct pending_req { | 343 | struct pending_req { |
344 | struct xen_blkif *blkif; | 344 | struct xen_blkif *blkif; |
345 | u64 id; | 345 | u64 id; |
346 | int nr_pages; | 346 | int nr_segs; |
347 | atomic_t pendcnt; | 347 | atomic_t pendcnt; |
348 | unsigned short operation; | 348 | unsigned short operation; |
349 | int status; | 349 | int status; |