package qcow

  1. Overview
  2. Docs

Parameters

Signature

include Qcow_s.RESIZABLE_BLOCK
include Mirage_block_lwt.S
type page_aligned_buffer = Cstruct.t
type error = private [>
  1. | Mirage_device.error
]
val pp_error : error Fmt.t
type write_error = private [>
  1. | `Disconnected
  2. | `Is_read_only
  3. | `Unimplemented
]
val pp_write_error : write_error Fmt.t
type 'a io = 'a Lwt.t
type t
val disconnect : t -> unit io
val get_info : t -> Mirage_block.info io
val read : t -> int64 -> page_aligned_buffer list -> (unit, error) Pervasives.result io
val write : t -> int64 -> page_aligned_buffer list -> (unit, write_error) Pervasives.result io
val resize : t -> int64 -> (unit, write_error) Result.result Lwt.t

Resize the file to the given number of sectors.

val flush : t -> (unit, write_error) Result.result io

flush t flushes any buffers, if the file has been opened in buffered mode

val connect : ?max_size_bytes:int64 -> B.t -> t Lwt.t

connect ?max_size_bytes b constructs a cache over b with a maximum memory footprint of max_size_bytes. Writes are heavily cached and only written to disk on a flush, disconnect or when out of space.

OCaml

Innovation. Community. Security.