Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251233
b: refs/heads/master
c: 976222e
h: refs/heads/master
i:
  251231: 3493c5d
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Apr 15, 2011
1 parent 9effa01 commit 33c92dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 1a95fe6e42cefc52c62c471ad87d7fe8643231df
refs/heads/master: 976222e05ea5a9959ccf880d7a24efbf79b3c6cf
14 changes: 7 additions & 7 deletions trunk/drivers/xen/blkback/blkback.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,13 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
(req->u.rw.seg[i].last_sect < req->u.rw.seg[i].first_sect))
goto fail_response;
preq.nr_sects += seg[i].nsec;

if (((int)preq.sector_number|(int)seg[i].nsec) &
((bdev_logical_block_size(preq.bdev) >> 9) - 1)) {
DPRINTK("Misaligned I/O request from domain %d",
blkif->domid);
goto fail_response;
}
}

if (vbd_translate(&preq, blkif, operation) != 0) {
Expand All @@ -542,13 +549,6 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
blkif_get(blkif);

for (i = 0; i < nseg; i++) {
if (((int)preq.sector_number|(int)seg[i].nsec) &
((bdev_logical_block_size(preq.bdev) >> 9) - 1)) {
DPRINTK("Misaligned I/O request from domain %d",
blkif->domid);
goto fail_put_bio;
}

while ((bio == NULL) ||
(bio_add_page(bio,
blkbk->pending_page(pending_req, i),
Expand Down

0 comments on commit 33c92dc

Please sign in to comment.