vhd: add prototype functions to parse a BATmap, if one is present

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: attempt to read the BATmap

This currently fails by generating non-aligned I/O.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: if we discover an unexpected Batmap version, report the found version rather than the expected

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
lwt: if we attempt an unaligned I/O print the bad alignment

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: the latest Batmap version we understand is 1.2

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: round up the Batmap_header to a sector boundary

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: add helper function roundup_sector

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: when reading the Batmap, round up to the next sector

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: expose the (optional) batmap fields in the query output

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: Batmap_header.size is really size_in_sectors, so rename for clarity

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd: if the batmap unmarshalling fails, continue without it

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: stream each vhd out with and without a batmap

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
sparse_dd: when bypassing the tapdisk for writing, assume destination is not prezeroed

The destination will be full of the old vhd metadata (and possibly
arbitrary other data)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
sparse_dd: add an experimental-writes-bypass-tapdisk option

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

Add basic batmap support