History | View | Annotate | Download (5.9 kB)
bdrv: Use "Error" for opening images
Add an Error ** parameter to BlockDriver.bdrv_open andBlockDriver.bdrv_file_open to allow more specific error messages.
Signed-off-by: Max Reitz <mreitz@redhat.com>
block: Add options QDict to .bdrv_open()
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
cloop: Fix bdrv_open() error handling
Return -errno instead of -1 on errors. While touching thecode, fix a memory leak.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block: move include files to include/block/
block/cloop: Use g_free instead of free
Fix mismatching allocation and deallocation: g_free should be used to pair withg_malloc.
Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed_by: Ray Wang <raywang@linux.vnet.ibm.com>Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>...
block/cloop: Fix coding style
Fix coding style in block/cloop.c.
Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed_by: Ray Wang <raywang@linux.vnet.ibm.com>Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: take lock around bdrv_read implementations
This does the first part of the conversion to coroutines, bywrapping bdrv_read implementations to take the mutex.
Drivers that implement bdrv_read rather than bdrv_co_readv canthen benefit from asynchronous operation (at least if the underlying...
block: add a CoMutex to synchronous read drivers
The big conversion of bdrv_read/write to coroutines caused the twohomonymous callbacks in BlockDriver to become reentrant. It goeslike this:
1) bdrv_read is now called in a coroutine, and calls bdrv_read or...
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>
cloop: use pread
Use pread instead of lseek + read in preparation of using the qemublock API.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
cloop: use qemu block API
Use bdrv_pwrite to access the backing device instead of pread, andconvert the driver to implementing the bdrv_open method which givesit an already opened BlockDriverState for the underlying device.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
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...
Move block drivers into their own directory