diff --git a/.travis.yml b/.travis.yml index a9b41d8..9840f30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,6 @@ env: global: - PACKAGE="mirage-block-xen" matrix: - - DISTRO="alpine" OCAML_VERSION="4.06" - - DISTRO="alpine" OCAML_VERSION="4.07" - - DISTRO="ubuntu" OCAML_VERSION="4.08" + - DISTRO="ubuntu" OCAML_VERSION="4.10" + - DISTRO="alpine" OCAML_VERSION="4.09" + - DISTRO="alpine" OCAML_VERSION="4.08" diff --git a/lib/back/blkback.ml b/lib/back/blkback.ml index df06a3e..ad590f5 100644 --- a/lib/back/blkback.ml +++ b/lib/back/blkback.ml @@ -32,7 +32,7 @@ type event val program_start: event (** represents an event which 'fired' when the program started *) -val after: Eventchn.t -> event -> event Lwt.t +val after: OS.Eventchn.t -> event -> event Lwt.t (** [next channel event] blocks until the system receives an event newer than [event] on channel [channel]. If an event is received while we aren't looking then this will be remembered and the @@ -61,8 +61,8 @@ type stats = { type ('a, 'b) t = { domid: int; - xe: Eventchn.handle; - evtchn: Eventchn.t; + xe: OS.Eventchn.handle; + evtchn: OS.Eventchn.t; ring: ('a, 'b) Ring.Rpc.Back.t; ops : ops; parse_req : Cstruct.t -> Req.t; @@ -271,7 +271,7 @@ let service_thread t stats = maybe_unmap indirect_grants_mapping; (* Make the responses visible to the frontend *) let notify = Ring.Rpc.Back.push_responses_and_check_notify t.ring in - if notify then Eventchn.notify t.xe t.evtchn; + if notify then OS.Eventchn.notify t.xe t.evtchn; return () in let open Lwt.Infix in A.after t.evtchn after @@ -280,7 +280,7 @@ let service_thread t stats = loop_forever A.program_start let init xe domid ring_info ops = - let evtchn = Eventchn.bind_interdomain xe domid ring_info.RingInfo.event_channel in + let evtchn = OS.Eventchn.bind_interdomain xe domid ring_info.RingInfo.event_channel in let parse_req, idx_size = match ring_info.RingInfo.protocol with | Protocol.X86_64 -> Req.Proto_64.read_request, Req.Proto_64.total_size | Protocol.X86_32 -> Req.Proto_32.read_request, Req.Proto_32.total_size @@ -397,7 +397,7 @@ let run ?(max_indirect_segments=256) t name (domid,devid) = let open Mirage_block in make () >>= fun client -> - let xe = Eventchn.init () in + let xe = OS.Eventchn.init () in mk_backend_path client name (domid,devid) >>= fun backend_path -> diff --git a/lib/back/dune b/lib/back/dune index e868502..1174e6a 100644 --- a/lib/back/dune +++ b/lib/back/dune @@ -4,6 +4,6 @@ (modules Blkback Block_request) (flags :standard -w -3) (libraries logs lwt cstruct io-page shared-memory-ring - shared-memory-ring-lwt mirage-block-xen xen-evtchn xenstore + shared-memory-ring-lwt mirage-block-xen xenstore xenstore.client mirage-block rresult mirage-xen) (wrapped false)) diff --git a/lib/front/blkfront.ml b/lib/front/blkfront.ml index 9009695..69e4771 100644 --- a/lib/front/blkfront.ml +++ b/lib/front/blkfront.ml @@ -299,24 +299,6 @@ let single_request_into op t start_sector ?(start_offset=0) ?(end_offset=7) page | exn -> fail exn) in retry () -let resume t = - let vdev = sprintf "%d" t.vdev in - let open Lwt.Infix in - plug vdev - >>= fun transport -> - let old_t = t.t in - t.t <- transport; - Lwt_ring.Front.shutdown old_t.client; - return () - -let resume () = - let devs = Hashtbl.fold (fun _k v acc -> v::acc) devices [] in - let open Lwt.Infix in - Lwt_list.iter_p (fun v -> - v >>= fun v -> - resume v - ) devs - let disconnect t = let open Lwt.Infix in let frontend_node = sprintf "device/vbd/%d/%s" t.vdev in @@ -504,7 +486,3 @@ let write t start_sector pages = >>= fun () -> return (Ok ()) ) (fun e -> return (Error (`Exn e))) - -let _ = - Log.debug (fun f -> f "Blkfront: add resume hook"); - Sched.add_resume_hook resume diff --git a/lib/front/dune b/lib/front/dune index bcb1781..bebf0a6 100644 --- a/lib/front/dune +++ b/lib/front/dune @@ -3,6 +3,6 @@ (public_name mirage-block-xen.front) (modules Blkfront Block) (libraries logs stringext lwt cstruct mirage-block io-page - io-page-xen shared-memory-ring shared-memory-ring-lwt mirage-block-xen - xen-evtchn mirage-xen) + shared-memory-ring shared-memory-ring-lwt mirage-block-xen + mirage-xen) (wrapped false)) diff --git a/mirage-block-xen.opam b/mirage-block-xen.opam index 222341a..80eb376 100644 --- a/mirage-block-xen.opam +++ b/mirage-block-xen.opam @@ -7,7 +7,7 @@ homepage: "https://github.com/mirage/mirage-block-xen" doc: "https://mirage.github.io/mirage-block-xen/" bug-reports: "https://github.com/mirage/mirage-block-xen/issues" depends: [ - "ocaml" {>= "4.06.0"} + "ocaml" {>= "4.08.0"} "dune" "cmdliner" "logs" @@ -18,8 +18,8 @@ depends: [ "shared-memory-ring-lwt" "mirage-block" {>= "2.0.0"} "ipaddr" - "io-page-xen" {>= "2.0.0"} - "mirage-xen" {>= "5.0.0"} + "io-page" {>= "2.0.0"} + "mirage-xen" {>= "6.0.0"} "rresult" ] build: [