Skip to content

Commit

Permalink
Merge pull request #4 from djs55/fix-read-sectors
Browse files Browse the repository at this point in the history
blkfront: the request should include the unaligned sector
  • Loading branch information
djs55 committed Oct 13, 2013
2 parents 2d69977 + a9ffe5c commit 3fa5c5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
trunk (unreleased)
* fix reading non-page aligned sectors

0.2.3 (5-Oct-2013):
* add Travis continuous integration scripts.
* use new Activations.after interface
Expand Down
3 changes: 2 additions & 1 deletion lib/blkfront.ml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ let read_single_request t r =
{ Req.gref; first_sector; last_sector }
) (Array.of_list rs) in
let id = Int64.of_int (List.hd rs) in
let req = Req.({ op=Some Read; handle=t.vdev; id; sector=r.start_sector; segs }) in
let sector = Int64.(add r.start_sector (of_int r.start_offset)) in
let req = Req.({ op=Some Read; handle=t.vdev; id; sector; segs }) in
lwt res = Lwt_ring.Front.push_request_and_wait t.t.client
(fun () -> Eventchn.notify h t.t.evtchn)
(Req.Proto_64.write_request req) in
Expand Down

0 comments on commit 3fa5c5d

Please sign in to comment.