summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-01 22:22:28 +0100
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-04-15 00:26:22 +0200
commitc35950bfa9abaaf16548a287a8d5d782a361414f (patch)
tree7b99c0c428a8a5deac11f568a3f2e533efe80616 /drivers
parentxen/blkback: Move global/static variables into struct xen_blkbk. (diff)
downloadlinux-c35950bfa9abaaf16548a287a8d5d782a361414f.tar.xz
linux-c35950bfa9abaaf16548a287a8d5d782a361414f.zip
xen/blkback: Union the blkif_request request specific fields
Following in the steps of patch: "xen: Union the blkif_request request specific fields" this patch changes the blkback. Per the original patch: "Prepare for extending the block device ring to allow request specific fields, by moving the request specific fields for reads, writes and barrier requests to a union member." Cc: Owen Smith <owen.smith@citrix.com> 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 c08875b0ad64..eda50646775d 100644
--- a/drivers/xen/blkback/blkback.c
+++ b/drivers/xen/blkback/blkback.c
@@ -426,7 +426,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
}
preq.dev = req->handle;
- preq.sector_number = req->sector_number;
+ preq.sector_number = req->u.rw.sector_number;
preq.nr_sects = 0;
pending_req->blkif = blkif;
@@ -438,11 +438,11 @@ static void dispatch_rw_block_io(blkif_t *blkif,
for (i = 0; i < nseg; i++) {
uint32_t flags;
- seg[i].nsec = req->seg[i].last_sect -
- req->seg[i].first_sect + 1;
+ seg[i].nsec = req->u.rw.seg[i].last_sect -
+ req->u.rw.seg[i].first_sect + 1;
- if ((req->seg[i].last_sect >= (PAGE_SIZE >> 9)) ||
- (req->seg[i].last_sect < req->seg[i].first_sect))
+ if ((req->u.rw.seg[i].last_sect >= (PAGE_SIZE >> 9)) ||
+ (req->u.rw.seg[i].last_sect < req->u.rw.seg[i].first_sect))
goto fail_response;
preq.nr_sects += seg[i].nsec;
@@ -450,7 +450,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
if (operation != READ)
flags |= GNTMAP_readonly;
gnttab_set_map_op(&map[i], vaddr(pending_req, i), flags,
- req->seg[i].gref, blkif->domid);
+ req->u.rw.seg[i].gref, blkif->domid);
}
ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, map, nseg);
@@ -472,7 +472,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,
page_to_pfn(blkbk->pending_page(pending_req, i)),
FOREIGN_FRAME(map[i].dev_bus_addr >> PAGE_SHIFT));
seg[i].buf = map[i].dev_bus_addr |
- (req->seg[i].first_sect << 9);
+ (req->u.rw.seg[i].first_sect << 9);
}
if (ret)