Statistics
| Branch: | Revision:

root / block / vdi.c @ 205ef796

History | View | Annotate | Download (29.2 kB)

# Date Author Comment
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 <>

9ac228e0 07/06/2010 06:05 pm Kevin Wolf

qcow2/vdi: Change check to distinguish error cases

This distinguishes between harmless leaks and real corruption. Hopefully users
better understand what qemu-img check wants to tell them.

Signed-off-by: Kevin Wolf <>

b666d239 05/17/2010 11:20 am Kevin Wolf

block: Avoid unchecked casts for AIOCBs

Use container_of for one direction and &acb->common for the other one.

Signed-off-by: Kevin Wolf <>

b76b6e95 05/17/2010 11:20 am Stefan Weil

block/vdi: Allow disk images of size 0

Even it is not very useful, users may create images of size 0.

Without the special option CONFIG_ZERO_MALLOC, qemu_mallocz
aborts execution when it is told to allocate 0 bytes,
so avoid this kind of call.

Cc: Kevin Wolf <>...

f21dc3a4 05/17/2010 11:20 am Stefan Weil

block/vdi: Fix image opening and creation for odd disk sizes

The fix is based on a patch from Kevin Wolf. Here his comment:

"The number of blocks needs to be rounded up to cover all of the virtual hard
disk. Without this fix, we can't even open our own images if their size is not...

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

95a2f9bc 01/08/2010 05:58 pm François Revol

block/vdi: allow disk sizes not multiple of block size

The disk image I created from my old laptop disk with VBoxManage
internalcommand converthd obviously was not a multiple of 1MB as when
created from scratch. This fixes QEMU refusing it. We still require the...

ee682d27 10/04/2009 02:24 pm Stefan Weil

Check availability of uuid header / library

If available, the Universally Unique Identifier library
is used by the vdi block driver.

Other parts of QEMU (vl.c) could also use it.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

a2a45a26 09/12/2009 03:36 pm Blue Swirl

Fix signedness warnings on OpenSolaris

Signed-off-by: Blue Swirl <>

6eea90eb 08/28/2009 03:33 am Stefan Weil

block/vdi.c: Fix several bugs

  • The code for option '-static' was wrong, so image creation
    always created static images.
  • Static images created with qemu-img did not set header entry
    blocks_allocated.
  • The size of the block map must be rounded to the next multiple...
1786dc15 08/15/2009 02:33 pm Blue Swirl

Use pstrcpy to avoid OpenBSD linker warnings

Signed-off-by: Blue Swirl <>

9aebd98a 08/10/2009 09:05 pm Stefan Weil

Add new block driver for the VDI format (only aio supported)

This is a new block driver written from scratch
to support the VDI format in QEMU.

VDI is the native format used by Innotek / SUN VirtualBox.

Latest changes:

  • stripped down version
    (code for synchronous operations and experimental code removed)...