Statistics
| Branch: | Revision:

root / block / vhdx.h @ 98a7a38f

History | View | Annotate | Download (19.1 kB)

# Date Author Comment
7e30e6a6 12/20/2013 10:11 am Jeff Cody

block: vhdx - improve error message, and .bdrv_check implementation

If there is a dirty log file to be replayed in a VHDX image, it is
replayed in .vhdx_open(). However, if the file is opened read-only,
then a somewhat cryptic error message results.

This adds a more helpful error message for the user. If an image file...

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...

8adc5233 11/07/2013 02:58 pm Jeff Cody

block: vhdx - add log write support

This adds support for writing to the VHDX log.

For spec details, see VHDX Specification Format v1.00:
https://www.microsoft.com/en-us/download/details.aspx?id=34750

There are a few limitations to this log support:
1.) There is no caching yet...

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 <>

61c02e56 11/07/2013 02:58 pm Jeff Cody

block: vhdx - fix comment typos in header, fix incorrect struct fields

VHDXPage83Data and VHDXParentLocatorHeader both incorrectly had their
MSGUID fields set as arrays of 16. This is incorrect (it stems from
an early version where those fields were uint_8 arrays). Those fields...

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 <>

625565d2 11/07/2013 02:58 pm Jeff Cody

block: vhdx - log support struct and defines

This adds some magic number defines, and internal structure definitions
for VHDX log replay support. The struct VHDXLogEntries does not reflect
an on-disk data structure, and thus does not need to be packed.
...

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 <>...

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...
52f35022 07/27/2013 10:22 am Stefan Weil

misc: Fix new typos in comments and strings

All these typos were found by codespell.

sould -> should
emperical -> empirical
intialization -> initialization
successfuly -> successfully
gaurantee -> guarantee

Fix also another error (before before) in the same context....

203cdba3 05/03/2013 11:31 am Jeff Cody

block: vhdx header for the QEMU support of VHDX images

This is based on Microsoft's VHDX specification:
"VHDX Format Specification v0.95", published 4/12/2012
https://www.microsoft.com/en-us/download/details.aspx?id=29681

These structures define the various header, metadata, and other...

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:...