- 15 12月, 2011 2 次提交
-
-
由 Paolo Bonzini 提交于
Initially done with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = qemu_aio_get (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however missed occurrences in linux-aio.c and posix-aio-compat.c. Those were done by hand. The change in vdi_aio_setup's caller was also done by hand. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Paolo Bonzini 提交于
Initially done with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = ( bdrv_aio_readv | bdrv_aio_writev | bdrv_aio_flush | bdrv_aio_discard | bdrv_aio_ioctl ) (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however missed the occurrence in block/blkverify.c (as it should have done), and left behind some unused variables. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 05 12月, 2011 1 次提交
-
-
由 Stefan Hajnoczi 提交于
It is trivial to switch from the synchronous .bdrv_is_allocated() interface to .bdrv_co_is_allocated() since vdi_is_allocated() does not block. Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 24 11月, 2011 2 次提交
-
-
由 Kevin Wolf 提交于
The block map is allocated in vdi_open, but was never freed. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
vdi caches the block map. For migration to work, it would have to be invalidated. Block migration for now. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 11 11月, 2011 1 次提交
-
-
由 Kevin Wolf 提交于
There are two different types of flush that you can do: Flushing one level up to the OS (i.e. writing data to the host page cache) or flushing it all the way down to the disk. The existing functions flush to the disk, reflect this in the function name. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 29 10月, 2011 1 次提交
-
-
由 Eric Sunshine 提交于
An entry in the VDI block map will hold an offset to the actual block if the block is allocated, or one of two specially-interpreted values if not allocated. Using VirtualBox terminology, value VDI_IMAGE_BLOCK_FREE (0xffffffff) represents a never-allocated block (semantically arbitrary content). VDI_IMAGE_BLOCK_ZERO (0xfffffffe) represents a "discarded" block (semantically zero-filled). block/vdi knows only about VDI_IMAGE_BLOCK_FREE. Teach it about VDI_IMAGE_BLOCK_ZERO. Signed-off-by: NEric Sunshine <sunshine@sunshineco.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 21 10月, 2011 1 次提交
-
-
由 Paolo Bonzini 提交于
Since coroutine operation is now mandatory, convert all bdrv_flush implementations to coroutines. For qcow2, this means taking the lock. Other implementations are simpler and just forward bdrv_flush to the underlying protocol, so they can avoid the lock. The bdrv_flush callback is then unused and can be eliminated. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 21 8月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 15 6月, 2011 1 次提交
-
-
由 Kevin Wolf 提交于
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 processing in a BH to avoid this situation. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 08 6月, 2011 1 次提交
-
-
由 Kevin Wolf 提交于
When not specifying a cluster size on the command line, qemu-img printed a 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 that it displays the default value that is used. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 04 4月, 2011 1 次提交
-
-
由 Stefan Weil 提交于
Replace endianess -> endianness. Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 15 3月, 2011 1 次提交
-
-
由 Stefan Weil 提交于
This patch is similar to 171e3d6b which 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: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 07 2月, 2011 1 次提交
-
-
由 Stefan Weil 提交于
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. Fix both by setting the correct size. The buggy code is only used when QEMU is build without uuid support. The bug is not critical, so there is no urgent need to apply it to old versions of QEMU. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 25 11月, 2010 1 次提交
-
-
由 Kevin Wolf 提交于
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: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 04 11月, 2010 1 次提交
-
-
由 Kevin Wolf 提交于
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: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 06 7月, 2010 1 次提交
-
-
由 Kevin Wolf 提交于
This distinguishes between harmless leaks and real corruption. Hopefully users better understand what qemu-img check wants to tell them. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 17 5月, 2010 3 次提交
-
-
由 Stefan Weil 提交于
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 a multiple of the block size." While Kevin's patch addressed vdi_create, my modification also fixes vdi_open which now accepts images with odd disk sizes. v3: Don't allow reading of disk images with too large disk sizes. Neither VBoxManage nor old versions of qemu-img read such images. This change requires rounding of odd disk sizes before we do the checks. Cc: Kevin Wolf <kwolf@redhat.com> Cc: François Revol <revol@free.fr> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Stefan Weil 提交于
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 <kwolf@redhat.com> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Use container_of for one direction and &acb->common for the other one. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 03 5月, 2010 1 次提交
-
-
由 Kevin Wolf 提交于
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 need to access the filename to open their file/device/connection/... a new callback bdrv_file_open is introduced which doesn't get an underlying file opened. For now, also some of the more obscure formats use bdrv_file_open because they open() the file themselves instead of using the block.c functions. They need to be fixed in later patches. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 08 1月, 2010 1 次提交
-
-
由 François Revol 提交于
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 size to be a multiple of sector size though. It then boots correctly. Allow opening VDI images with size not multiple of 1MB (as when converted from a raw disk). Signed-off-by: NFrançois Revol <revol@free.fr> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 04 10月, 2009 1 次提交
-
-
由 Stefan Weil 提交于
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: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
- 12 9月, 2009 1 次提交
-
-
由 Blue Swirl 提交于
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 28 8月, 2009 1 次提交
-
-
由 Stefan Weil 提交于
* 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 of SECTOR_SIZE, otherwise the block map is only read partially for block map sizes which are not a multiple of SECTOR_SIZE. Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 15 8月, 2009 1 次提交
-
-
由 Blue Swirl 提交于
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 11 8月, 2009 1 次提交
-
-
由 Stefan Weil 提交于
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) * don't open VDI snapshot images (with uuid_link or uuid_parent) * modified vdi_aio_cancel Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Message-Id:
-