Statistics
| Branch: | Revision:

root / block / vhdx.c @ 8c116b0e

History | View | Annotate | Download (61.9 kB)

# Date Author Comment
97b00e28 12/03/2013 04:26 pm Paolo Bonzini

vpc, vhdx: add get_info

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Peter Lieven <>
Signed-off-by: Stefan Hajnoczi <>

95de6d70 12/03/2013 04:26 pm Paolo Bonzini

block drivers: add discard/write_zeroes properties to bdrv_get_info implementation

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Peter Lieven <>
Signed-off-by: Stefan Hajnoczi <>

1a848fd4 11/07/2013 02:58 pm Jeff Cody

block: vhdx - add region overlap detection for image files

Regions in the image file cannot overlap - the log, region tables,
and metdata must all be unique and non-overlapping.

This adds region checking by means of a QLIST; there can be a variable
number of regions and metadata (there may be metadata or region tables...

d92aa883 11/07/2013 02:58 pm Jeff Cody

block: vhdx write support

This adds support for writing to VHDX image files, using coroutines.
Writes into the BAT table goes through the VHDX log. Currently, BAT
table writes occur when expanding a dynamic VHDX file, and allocating a
new BAT entry.

Signed-off-by: Jeff Cody <>...

0b7da092 11/07/2013 02:58 pm Jeff Cody

block: vhdx - remove BAT file offset bit shifting

Bit shifting can be fun, but in this case it was unnecessary. The
upper 44 bits of the 64-bit BAT entry is specifies the File Offset,
so we shifted the bits to get access to the value.

However, per the spec the value is in MB. So we dutifully shifted back...

c325ee1d 11/07/2013 02:58 pm Jeff Cody

block: vhdx - move more endian translations to vhdx-endian.c

In preparation for vhdx_create(), move more endian translation
functions out to vhdx-endian.c.

Signed-off-by: Jeff Cody <>
Signed-off-by: Stefan Hajnoczi <>

1e74a971 11/07/2013 02:58 pm Jeff Cody

block: vhdx - break out code operations to functions

This is preperation for vhdx_create(). The ability to write headers,
and calculate the number of BAT entries will be needed within the
create() functions, so move this relevant code into helper functions....

3412f7b1 11/07/2013 02:58 pm Jeff Cody

block: vhdx - add .bdrv_create() support

This adds support for VHDX image creation, for images of type "Fixed"
and "Dynamic". "Differencing" types (i.e., VHDX images with backing
files) are currently not supported.

Options for image creation include: * log size:...

6e9d290b 11/07/2013 02:58 pm Jeff Cody

block: vhdx - minor comments and typo correction.

Just a couple of minor comments to help note where allocated
buffers are freed, and a typo fix.

Signed-off-by: Jeff Cody <>
Signed-off-by: Stefan Hajnoczi <>

4f18b782 11/07/2013 02:58 pm Jeff Cody

block: vhdx - add header update capability.

This adds the ability to update the headers in a VHDX image, including
generating a new MS-compatible GUID.

As VHDX depends on uuid.h, VHDX is now a configurable build option. If
VHDX support is enabled, that will also enable uuid as well. The...

28541d46 11/07/2013 02:58 pm Jeff Cody

block: vhdx code movement - VHDXMetadataEntries and BDRVVHDXState to header.

In preparation for VHDX log support, move these structures to the
header.

Signed-off-by: Jeff Cody <>
Signed-off-by: Stefan Hajnoczi <>

0f48e8f0 11/07/2013 02:58 pm Jeff Cody

block: vhdx - break endian translation functions out

This moves the endian translation functions out from the vhdx.c source,
into a separate source file. In addition to the previously defined
endian functions, new endian translation functions for log support are...

c3906c5e 11/07/2013 02:58 pm Jeff Cody

block: vhdx - update log guid in header, and first write tracker

Allow tracking of first file write in the VHDX image, as well as
the ability to update the GUID in the header. This is in preparation
for log support.

Signed-off-by: Jeff Cody <>...

c46415af 11/07/2013 02:58 pm Jeff Cody

block: vhdx code movement - move vhdx_close() above vhdx_open()

Signed-off-by: Jeff Cody <>
Signed-off-by: Stefan Hajnoczi <>

0a43a1b5 11/07/2013 02:58 pm Jeff Cody

block: vhdx - log parsing, replay, and flush support

This adds support for VHDX v0 logs, as specified in Microsoft's
VHDX Specification Format v1.00:
https://www.microsoft.com/en-us/download/details.aspx?id=34750

The following support is added:

  • Log parsing, and validation - validate that an existing log...
5641bf40 10/02/2013 04:24 pm Jeff Cody

block: vhdx - add migration blocker

This blocks migration for VHDX image files, until the
functionality can be supported.

Signed-off-by: Jeff Cody <>
Signed-off-by: Stefan Hajnoczi <>

015a1036 09/12/2013 11:12 am Max Reitz

bdrv: Use "Error" for opening images

Add an Error ** parameter to BlockDriver.bdrv_open and
BlockDriver.bdrv_file_open to allow more specific error messages.

Signed-off-by: Max Reitz <>

e8d4e5ff 05/03/2013 11:31 am Jeff Cody

block: initial VHDX driver support framework - supports open and probe

This is the initial block driver framework for VHDX image support
(i.e. Hyper-V image file formats), that supports opening VHDX files, and
parsing the headers.

This commit does not yet enable:...

059e2fbb 05/03/2013 11:31 am Jeff Cody

block: add read-only support to VHDX image format.

This adds in read-only support to the VHDX image format. This supports
reads for fixed-size, and dynamic sized VHDX images.

Differencing files are still unsupported.

The image must be opened without BDRV_O_RDWR set, because we do not...