Statistics
| Branch: | Revision:

root / block / vmdk.c @ fab5cf59

History | View | Annotate | Download (25.6 kB)

# Date Author Comment
16372ff0 06/08/2011 11:39 am Alexander Graf

vmdk: fix endianness bugs

The vmdk code is sloppy when handling the header descriptor during
creation of an image. Fix all header accesses in the create path to
either store native endianness or convert it when appropriate.

Reported-by: Yury Tsarev <>...

80465c50 11/24/2010 06:31 pm Kevin Wolf

block: Remove unused s->hd in various drivers

All drivers use bs->file instead of s->hd for quite a while now, so it's time
to remove s->hd.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Stefan Hajnoczi <>

205ef796 11/04/2010 01:52 pm Kevin Wolf

block: Allow bdrv_flush to return errors

This changes bdrv_flush to return 0 on success and -errno in case of failure.
It's a requirement for implementing proper error handle in users of bdrv_flush.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Stefan Hajnoczi <>

b8852e87 06/22/2010 03:38 pm Kevin Wolf

vmdk: Use bdrv_(p)write_sync for metadata writes

Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash.

Signed-off-by: Kevin Wolf <>

c336500d 05/03/2010 11:07 am Kevin Wolf

vmdk: Fix COW

When trying to do COW, VMDK wrote the data back to the backing file. This
problem was revealed by the patch that made backing files read-only. This patch
does not only fix the problem, but also simplifies the VMDK code a bit.

This fixes the backing file qemu-iotests cases for VMDK....

9949f97e 05/03/2010 11:07 am Kevin Wolf

vmdk: Clean up backing file handling

VMDK is doing interesting things when it needs to open a backing file. This
patch changes that part to look more like in other drivers. The nice side
effect is that the file name isn't needed any more in the open function....

6511ef77 05/03/2010 11:07 am Kevin Wolf

vmdk: Convert to bdrv_open

It's a format driver, so implement bdrv_open instead of bdrv_file_open.

Signed-off-by: Kevin Wolf <>

66f82cee 05/03/2010 11:07 am Kevin Wolf

block: Open the underlying image file in generic code

Format drivers shouldn't need to bother with things like file names, but rather
just get an open BlockDriverState for the underlying protocol. This patch
introduces this behaviour for bdrv_open implementation. For protocols which...

d6e9098e 04/23/2010 05:08 pm Kevin Wolf

Replace calls of old bdrv_open

What is known today as bdrv_open2 becomes the new bdrv_open. All remaining
callers of the old function are converted to the new one. In some places they
even know the right format, so they should have used bdrv_open2 from the...

b781cce5 03/09/2010 07:23 pm Juan Quintela

vmdk: return errno instead of -1

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

53c2e716 03/09/2010 07:23 pm Juan Quintela

vmdk: make vmdk_snapshot_create return -errno

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

a161329b 03/09/2010 07:23 pm Juan Quintela

vmdk: fix double free

fail_gd error case would also free rgd_buf that was already freed

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

3829cb46 03/09/2010 07:23 pm Juan Quintela

vmdk: share cleanup code

cleanup code is identical for error/success cases. Only difference
are goto labels.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

1640366c 01/26/2010 10:59 pm Kirill A. Shutemov

block/vmdk.o: fix warnings with _FORTIFY_SOURCE

CC block/vmdk.o
cc1: warnings being treated as errors
block/vmdk.c: In function 'vmdk_snapshot_create':
block/vmdk.c:236: error: ignoring return value of 'ftruncate', declared with attribute warn_unused_result...

f5edb014 01/20/2010 04:25 pm Naphtali Sprei

Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.

Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,...

b171271a 07/22/2009 06:58 pm Kevin Wolf

vmdk: Fix backing file handling

Instead of storing the backing file in its own BlockDriverState, VMDK uses the
BlockDriverState of the raw image file it opened. This is wrong and breaks
functions that access the backing file or protocols. This fix replaces all...

db08adf5 06/06/2009 06:38 pm Kevin Wolf

qemu-img: Print available options with -o ?

This patch adds a small help text to each of the options in the block drivers
which can be displayed by using qemu-img create -f fmt -o ?

Signed-off-by: Kevin Wolf <>

0e7e1989 05/22/2009 06:50 pm Kevin Wolf

Convert all block drivers to new bdrv_create

Now we can make use of the newly introduced option structures. Instead of
having bdrv_create carry more and more parameters (which are format specific in
most cases), just pass a option structure as defined by the driver itself....

019d6b8f 05/15/2009 12:13 am Anthony Liguori

Move block drivers into their own directory

Signed-off-by: Anthony Liguori <>