coroutine: add qemu_co_queue_restart_all()
It's common to wake up all waiting coroutines. Introduce theqemu_co_queue_restart_all() function to do this instead of looping overqemu_co_queue_next() in every caller.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
block: add request tracking
The block layer does not know about pending requests. This informationis necessary for copy-on-read since overlapping requests must beserialized to prevent races that corrupt the image.
The BlockDriverState gets a new tracked_request list field which...
block: add interface to toggle copy-on-read
The bdrv_enable_copy_on_read()/bdrv_disable_copy_on_read() functions canbe used to programmatically enable or disable copy-on-read for a blockdevice. Later patches add the actual copy-on-read logic.
block: wait for overlapping requests
When copy-on-read is enabled it is necessary to wait for overlappingrequests before issuing new requests. This prevents races between thecopy-on-read and a write request.
block: request overlap detection
Detect overlapping requests and remember to align to cluster boundariesif the image format uses them. This assumes that allocating I/O isperformed in cluster granularity - which is true for qcow2, qed, etc.
block: core copy-on-read logic
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: add -drive copy-on-read=on|off
This patch adds the -drive copy-on-read=on|off command-line option:
copy-on-read=on|off copy-on-read is "on" or "off" and enables whether to copy read backing file sectors into the image file. Copy-on-read avoids accessing the...
cow: use bdrv_co_is_allocated()
Now that bdrv_co_is_allocated() is available we can use it instead ofthe synchronous bdrv_is_allocated() interface. This is a follow-up thatKevin Wolf <kwolf@redhat.com> pointed out after applying the series thatintroduces bdrv_co_is_allocated()....
dma-helpers: Add trace events
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qemu-common: add QEMU_ALIGN_DOWN() and QEMU_ALIGN_UP() macros
Add macros for aligning a number to a multiple, for example:
QEMU_ALIGN_DOWN(500, 2000) = 0QEMU_ALIGN_UP(500, 2000) = 2000
Since ALIGN_UP() is a common macro name use the QEMU_* namespace prefix....
View all revisions | View revisions
Also available in: Atom