diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-11-01 17:03:14 -0400 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-11-02 11:27:58 -0400 |
commit | a945b9801a9bfd4a98bcfd9f6656b5027b254e3f (patch) | |
tree | 5b84d36975e5ebe2a34d73e58726795293f818f9 /drivers/block | |
parent | c64e38ea17a81721da0393584fd807f8434050fa (diff) |
xen/blkfront: change blk_shadow.request to proper pointer
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/xen-blkfront.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 3a318d8576c5..31c8a643d109 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -65,7 +65,7 @@ enum blkif_state { | |||
65 | 65 | ||
66 | struct blk_shadow { | 66 | struct blk_shadow { |
67 | struct blkif_request req; | 67 | struct blkif_request req; |
68 | unsigned long request; | 68 | struct request *request; |
69 | unsigned long frame[BLKIF_MAX_SEGMENTS_PER_REQUEST]; | 69 | unsigned long frame[BLKIF_MAX_SEGMENTS_PER_REQUEST]; |
70 | }; | 70 | }; |
71 | 71 | ||
@@ -136,7 +136,7 @@ static void add_id_to_freelist(struct blkfront_info *info, | |||
136 | unsigned long id) | 136 | unsigned long id) |
137 | { | 137 | { |
138 | info->shadow[id].req.id = info->shadow_free; | 138 | info->shadow[id].req.id = info->shadow_free; |
139 | info->shadow[id].request = 0; | 139 | info->shadow[id].request = NULL; |
140 | info->shadow_free = id; | 140 | info->shadow_free = id; |
141 | } | 141 | } |
142 | 142 | ||
@@ -278,7 +278,7 @@ static int blkif_queue_request(struct request *req) | |||
278 | /* Fill out a communications ring structure. */ | 278 | /* Fill out a communications ring structure. */ |
279 | ring_req = RING_GET_REQUEST(&info->ring, info->ring.req_prod_pvt); | 279 | ring_req = RING_GET_REQUEST(&info->ring, info->ring.req_prod_pvt); |
280 | id = get_id_from_freelist(info); | 280 | id = get_id_from_freelist(info); |
281 | info->shadow[id].request = (unsigned long)req; | 281 | info->shadow[id].request = req; |
282 | 282 | ||
283 | ring_req->id = id; | 283 | ring_req->id = id; |
284 | ring_req->sector_number = (blkif_sector_t)blk_rq_pos(req); | 284 | ring_req->sector_number = (blkif_sector_t)blk_rq_pos(req); |
@@ -633,7 +633,7 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id) | |||
633 | 633 | ||
634 | bret = RING_GET_RESPONSE(&info->ring, i); | 634 | bret = RING_GET_RESPONSE(&info->ring, i); |
635 | id = bret->id; | 635 | id = bret->id; |
636 | req = (struct request *)info->shadow[id].request; | 636 | req = info->shadow[id].request; |
637 | 637 | ||
638 | blkif_completion(&info->shadow[id]); | 638 | blkif_completion(&info->shadow[id]); |
639 | 639 | ||
@@ -898,7 +898,7 @@ static int blkif_recover(struct blkfront_info *info) | |||
898 | /* Stage 3: Find pending requests and requeue them. */ | 898 | /* Stage 3: Find pending requests and requeue them. */ |
899 | for (i = 0; i < BLK_RING_SIZE; i++) { | 899 | for (i = 0; i < BLK_RING_SIZE; i++) { |
900 | /* Not in use? */ | 900 | /* Not in use? */ |
901 | if (copy[i].request == 0) | 901 | if (!copy[i].request) |
902 | continue; | 902 | continue; |
903 | 903 | ||
904 | /* Grab a request slot and copy shadow state into it. */ | 904 | /* Grab a request slot and copy shadow state into it. */ |
@@ -915,9 +915,7 @@ static int blkif_recover(struct blkfront_info *info) | |||
915 | req->seg[j].gref, | 915 | req->seg[j].gref, |
916 | info->xbdev->otherend_id, | 916 | info->xbdev->otherend_id, |
917 | pfn_to_mfn(info->shadow[req->id].frame[j]), | 917 | pfn_to_mfn(info->shadow[req->id].frame[j]), |
918 | rq_data_dir( | 918 | rq_data_dir(info->shadow[req->id].request)); |
919 | (struct request *) | ||
920 | info->shadow[req->id].request)); | ||
921 | info->shadow[req->id].req = *req; | 919 | info->shadow[req->id].req = *req; |
922 | 920 | ||
923 | info->ring.req_prod_pvt++; | 921 | info->ring.req_prod_pvt++; |