History | View | Annotate | Download (30 kB)
block/qcow: Don't ignore immediate read/write and other failures
This patch is similar to 171e3d6b9997c98a97d0c525867f7cd9b640caddwhich fixed qcow2:
Returning -EIO is far from optimal, but at least it's an error code.
In addition to read/write failures, -EIO is also returned when...
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.
qcow: 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 <kwolf@redhat.com>
block: Avoid unchecked casts for AIOCBs
Use container_of for one direction and &acb->common for the other one.
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...
qcow: return errno instead of -1
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block/qcow.c: fix warnings with _FORTIFY_SOURCE
CC block/qcow.occ1: warnings being treated as errorsblock/qcow.c: In function 'qcow_create':block/qcow.c:804: error: ignoring return value of 'write', declared with attribute warn_unused_resultblock/qcow.c:806: error: ignoring return value of 'write', declared with attribute warn_unused_result...
qcow/qcow2: implement bdrv_aio_flush
Now that we do not have to flush the backing device anymore implementingthe bdrv_aio_flush method for image formats is trivial.
[hch: forward ported to qemu mainline from a product tree]
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
qcow1: Fix qcow_aio_writev
Pass is_write = 1 to qcow_aio_setup when writing.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-img: Print available options with -o ?
This patch adds a small help text to each of the options in the block driverswhich can be displayed by using qemu-img create -f fmt -o ?
fully split aio_pool from BlockDriver
Now that we have a separate aio pool structure we can remove thoseaio pool details from BlockDriver.
Every driver supporting AIO now needs to declare a static AIOPoolwith the aiocb size and the cancellation method. This cleans up the...
qcow: add qcow_aio_setup helper
[this one is required for [PATCH] fully split aio_pool from BlockDriver, sorry for not sending it out earlier]
Add a qcow_aio_setup helper to qcow to shared common code betweenthe aio_readv and aio_writev methods. Based on the function with...
qcow/qcow2: Drop synchronous qcow_write()
There is only one (internal) user left and it can be switched to the normalemulation provided in block.c
Convert all block drivers to new bdrv_create
Now we can make use of the newly introduced option structures. Instead ofhaving bdrv_create carry more and more parameters (which are format specific inmost cases), just pass a option structure as defined by the driver itself....
Move block drivers into their own directory
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>