History | View | Annotate | Download (29.9 kB)
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vdi: Avoid direct AIO callback
bdrv_aio_* must not call the callback before returning to its caller. In vdi,this could happen in some error cases. This starts the real requests processingin a BH to avoid this situation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img create: Fix displayed default cluster size
When not specifying a cluster size on the command line, qemu-img printeda cluster size of 0:
Formatting '/tmp/test.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=0
This patch adds the default cluster size to the QEMUOptionParameter list, so...
Fix trivial "endianness bugs"
Replace endianess -> endianness.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
block/vdi: Don't ignore immediate read/write failures
This patch is similar to 171e3d6b9997c98a97d0c525867f7cd9b640caddwhich fixed qcow2:
Returning -EIO is far from optimal, but at least it's an error code.
Cc: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
block/vdi: Fix wrong size in conditionally used memset, memcmp
Error report from cppcheck:block/vdi.c:122: error: Using sizeof for array given as function argument returns the size of pointer.block/vdi.c:128: error: Using sizeof for array given as function argument returns the size of pointer....
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 timeto remove s->hd.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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.
qcow2/vdi: Change check to distinguish error cases
This distinguishes between harmless leaks and real corruption. Hopefully usersbetter understand what qemu-img check wants to tell them.
block: Avoid unchecked casts for AIOCBs
Use container_of for one direction and &acb->common for the other one.
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_malloczaborts execution when it is told to allocate 0 bytes,so avoid this kind of call.
Cc: Kevin Wolf <kwolf@redhat.com>...
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 harddisk. Without this fix, we can't even open our own images if their size is not...
block: Open the underlying image file in generic code
Format drivers shouldn't need to bother with things like file names, but ratherjust get an open BlockDriverState for the underlying protocol. This patchintroduces this behaviour for bdrv_open implementation. For protocols which...
block/vdi: allow disk sizes not multiple of block size
The disk image I created from my old laptop disk with VBoxManageinternalcommand converthd obviously was not a multiple of 1MB as whencreated from scratch. This fixes QEMU refusing it. We still require the...
Check availability of uuid header / library
If available, the Universally Unique Identifier libraryis used by the vdi block driver.
Other parts of QEMU (vl.c) could also use it.
Fix signedness warnings on OpenSolaris
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
block/vdi.c: Fix several bugs
Use pstrcpy to avoid OpenBSD linker warnings
Add new block driver for the VDI format (only aio supported)
This is a new block driver written from scratchto support the VDI format in QEMU.
VDI is the native format used by Innotek / SUN VirtualBox.
Latest changes: