Move Vhd_input.hybrid to Hybrid_input.raw

This follows the convention of naming functions as
  Module: the kind of input
  Function: the kind of output

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update CHANGES

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add Hybrid_input.vhd, to output vhd-formatted data from 'hybrid' input

Internally we re-use the same vhd formatting functions, we just expose
variations in the interface.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
When writing vhds, missing blocks should not be counted as work

Missing blocks are omitted from the output, so they should not be
counted as work, otherwise progress bar calculations are completely
wrong for sparse files.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
ocamlfind name is vhd-format, not vhd

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: add a streaming parser for vhd-format data

One may write:

  module M = From_input(Vhd_lwt.Input)

and then generate a stream of Fragment.ts from a file descriptor
using

  M.openstream fd

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Expose Vhd.BAT.fold; compute the physical offset of each Vhd.Fragment.Block

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: optimise incremental parsing of vhd-formatted data

Coalesce runs of 1s or 0s in block bitmaps, merging most 512-byte
writes into 2MiB writes.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: add a simple wrapper around vhd-util create

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: rename 'openfile' to 'openchain'; add 'openfile'

openchain: opens every vhd file on a path to the root or
  fails trying

openfile: opens only the named vhd file

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #19 from djs55/openchain

vhd: rename 'openfile' to 'openchain'; add 'openfile'
Switch the result type to a polymorphic variant

We want this not to clash with other identical definitions in
other libraries.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Rename Vhd -> F (for 'format'); add vhd_lwt.mli

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Complete renaming of 'Vhd' to 'F'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Rename 'Vhd_result' to simpler 'Result'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Start adding implementation of V1_LWT.BLOCK

This will allow mirage apps to read and write .vhd format data
transparently.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
BLOCK: implement read, write

Note the vhd API requires an extra data copy -- we should remove
this.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
BLOCK: verify the file exists in 'connect'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Use Io_page for memory allocation

We don't need to functorise over the memory allocator: the standard
page-aligned allocator will do.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
The core library doesn't need lwt or lwt.unix

Signed-off-by: David Scott <dave.scott@eu.citrix.com>