Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251216
b: refs/heads/master
c: efe08a3
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Konrad Rzeszutek Wilk committed Apr 14, 2011
1 parent a2e826e commit 643ce56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc0c081b0e7a4afc4d2c7bc0666f5cd169e96814
refs/heads/master: efe08a3eecf15ab022afba48c691d02c7de2fbbb
10 changes: 6 additions & 4 deletions trunk/drivers/xen/blkback/blkback.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ static inline int vaddr_pagenr(pending_req_t *req, int seg)
return (req - pending_reqs) * BLKIF_MAX_SEGMENTS_PER_REQUEST + seg;
}

#define pending_page(req, seg) pending_pages[vaddr_pagenr(req, seg)]

static inline unsigned long vaddr(pending_req_t *req, int seg)
{
unsigned long pfn = page_to_pfn(pending_pages[vaddr_pagenr(req, seg)]);
unsigned long pfn = page_to_pfn(pending_page(req, seg));
return (unsigned long)pfn_to_kaddr(pfn);
}

Expand Down Expand Up @@ -463,8 +465,8 @@ static void dispatch_rw_block_io(blkif_t *blkif,
if (ret)
continue;

set_phys_to_machine(__pa(vaddr(
pending_req, i)) >> PAGE_SHIFT,
set_phys_to_machine(
page_to_pfn(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);
Expand Down Expand Up @@ -495,7 +497,7 @@ static void dispatch_rw_block_io(blkif_t *blkif,

while ((bio == NULL) ||
(bio_add_page(bio,
virt_to_page(vaddr(pending_req, i)),
pending_page(pending_req, i),
seg[i].nsec << 9,
seg[i].buf & ~PAGE_MASK) == 0)) {
if (bio) {
Expand Down

0 comments on commit 643ce56

Please sign in to comment.