Depend on mirage-types; add stub implementation of BLOCK_DEVICE

Note the 'read' and 'write' functions simply return `Error Unknown

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update following V1.BLOCK error type change

We now return Error Is_read_only for an attempt to write
to a read/only device, and Error Unimplemented otherwise.

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

Note we advertise a minimum sector size of 4KiB (ie a page) to ensure
the read/write start_sector is page-aligned as well as sector-aligned.
More and more disks are using 4kiB sectors natively, and this simplifies
the logic.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add a basic 'connect' function

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Register the blkfront as the "local" block driver

Also use the mirage-platform's Block.S signature, which is
the mirage-type V1.BLOCK_DEVICE with abstract types instantiated.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
blkfront: make 'connect' block properly

This is necessary because devices are plugged asynchronously.

We still need a device naming scheme: currently xen devices have
funny names like '51712' '51768' etc.

This 'pair of Hashtbl.ts with Lwt_sequence.ts full of waiters'
seems like a common pattern. Perhaps it should be factored out.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Blkfront_init.register () is the only registration function needed

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update after page_aligned_buffer := Cstruct.t change

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
blkfront: fix sector/offset calculations in new BLOCK interface

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove commented-out dead code

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

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

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #8 from djs55/add-mirage-types

Implement new mirage-types BLOCK signature