From: Julien Grall <julien.grall@citrix.com> To: <xen-devel@lists.xenproject.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Julien Grall" <julien.grall@linaro.org>, "Julien Grall" <julien.grall@citrix.com>, "Roger Pau Monné" <roger.pau@citrix.com>, "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> Subject: [PATCH v2 7/7] block/xen-blkback: s/nr_pages/nr_segs/ Date: Wed, 17 Jun 2015 15:28:08 +0100 [thread overview] Message-ID: <1434551288-14113-8-git-send-email-julien.grall@citrix.com> (raw) In-Reply-To: <1434551288-14113-1-git-send-email-julien.grall@citrix.com> From: Julien Grall <julien.grall@linaro.org> 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> --- Changes in v2: - Add Roger's Acked-by --- drivers/block/xen-blkback/blkback.c | 10 +++++----- 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 713fc9f..7049528 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) struct grant_page **pages = req->segments; unsigned int invcount; - invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_pages, + invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_segs, req->unmap, req->unmap_pages); work->data = req; @@ -915,7 +915,7 @@ static int xen_blkbk_map_seg(struct pending_req *pending_req) int rc; rc = xen_blkbk_map(pending_req->blkif, pending_req->segments, - pending_req->nr_pages, + pending_req->nr_segs, (pending_req->operation != BLKIF_OP_READ)); return rc; @@ -931,7 +931,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req, int indirect_grefs, rc, n, nseg, i; struct blkif_request_segment *segments = NULL; - nseg = pending_req->nr_pages; + nseg = pending_req->nr_segs; indirect_grefs = INDIRECT_PAGES(nseg); BUG_ON(indirect_grefs > BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST); @@ -1251,7 +1251,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, pending_req->id = req->u.rw.id; pending_req->operation = req_operation; pending_req->status = BLKIF_RSP_OKAY; - pending_req->nr_pages = nseg; + pending_req->nr_segs = nseg; if (req->operation != BLKIF_OP_INDIRECT) { preq.dev = req->u.rw.handle; @@ -1372,7 +1372,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, fail_flush: xen_blkbk_unmap(blkif, pending_req->segments, - pending_req->nr_pages); + pending_req->nr_segs); fail_response: /* Haven't submitted any bio's yet. */ 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 f620b5d..7a03e07 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -343,7 +343,7 @@ struct grant_page { struct pending_req { struct xen_blkif *blkif; u64 id; - int nr_pages; + int nr_segs; atomic_t pendcnt; unsigned short operation; int status; -- 2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: julien.grall@citrix.com (Julien Grall) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 7/7] block/xen-blkback: s/nr_pages/nr_segs/ Date: Wed, 17 Jun 2015 15:28:08 +0100 [thread overview] Message-ID: <1434551288-14113-8-git-send-email-julien.grall@citrix.com> (raw) In-Reply-To: <1434551288-14113-1-git-send-email-julien.grall@citrix.com> From: Julien Grall <julien.grall@linaro.org> 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> --- Changes in v2: - Add Roger's Acked-by --- drivers/block/xen-blkback/blkback.c | 10 +++++----- 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 713fc9f..7049528 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) struct grant_page **pages = req->segments; unsigned int invcount; - invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_pages, + invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_segs, req->unmap, req->unmap_pages); work->data = req; @@ -915,7 +915,7 @@ static int xen_blkbk_map_seg(struct pending_req *pending_req) int rc; rc = xen_blkbk_map(pending_req->blkif, pending_req->segments, - pending_req->nr_pages, + pending_req->nr_segs, (pending_req->operation != BLKIF_OP_READ)); return rc; @@ -931,7 +931,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req, int indirect_grefs, rc, n, nseg, i; struct blkif_request_segment *segments = NULL; - nseg = pending_req->nr_pages; + nseg = pending_req->nr_segs; indirect_grefs = INDIRECT_PAGES(nseg); BUG_ON(indirect_grefs > BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST); @@ -1251,7 +1251,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, pending_req->id = req->u.rw.id; pending_req->operation = req_operation; pending_req->status = BLKIF_RSP_OKAY; - pending_req->nr_pages = nseg; + pending_req->nr_segs = nseg; if (req->operation != BLKIF_OP_INDIRECT) { preq.dev = req->u.rw.handle; @@ -1372,7 +1372,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, fail_flush: xen_blkbk_unmap(blkif, pending_req->segments, - pending_req->nr_pages); + pending_req->nr_segs); fail_response: /* Haven't submitted any bio's yet. */ 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 f620b5d..7a03e07 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -343,7 +343,7 @@ struct grant_page { struct pending_req { struct xen_blkif *blkif; u64 id; - int nr_pages; + int nr_segs; atomic_t pendcnt; unsigned short operation; int status; -- 2.1.4
next prev parent reply other threads:[~2015-06-17 14:29 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-06-17 14:28 [PATCH v2 0/7] xen: Clean up Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` [PATCH v2 1/7] xen: Include xen/page.h rather than asm/xen/page.h Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` [PATCH v2 2/7] xen/xenbus: client: Fix call of virt_to_mfn in xenbus_grant_ring Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` [PATCH v2 3/7] xen/grant-table: Remove unused macro SPP Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` [PATCH v2 4/7] arm/xen: Drop duplicate define mfn_to_virt Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` [PATCH v2 5/7] block/xen-blkfront: Remove unused macro MAXIMUM_OUTSTANDING_BLOCK_REQS Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` [PATCH v2 6/7] block/xen-blkfront: Remove invalid comment Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 14:28 ` Julien Grall [this message] 2015-06-17 14:28 ` [PATCH v2 7/7] block/xen-blkback: s/nr_pages/nr_segs/ Julien Grall 2015-06-17 14:28 ` Julien Grall 2015-06-17 15:36 ` [Xen-devel] [PATCH v2 0/7] xen: Clean up David Vrabel 2015-06-17 15:36 ` David Vrabel 2015-06-17 15:36 ` David Vrabel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1434551288-14113-8-git-send-email-julien.grall@citrix.com \ --to=julien.grall@citrix.com \ --cc=julien.grall@linaro.org \ --cc=konrad.wilk@oracle.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=roger.pau@citrix.com \ --cc=xen-devel@lists.xenproject.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.