History | View | Annotate | Download (16.2 kB)
block/curl: Fix wrong free statement
Report from smatch:block/curl.c:546 curl_close(21) info: redundant null check on s->url calling free()
The check was redundant, and free was also wrong because the memorywas allocated using g_strdup.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
allow qemu_iovec_from_buffer() to specify offset from which to start copying
Similar to qemu_iovec_memset(QEMUIOVector *qiov, size_t offset, int c, size_t bytes);the new prototype is: qemu_iovec_from_buf(QEMUIOVector *qiov, size_t offset,...
aio: remove process_queue callback and qemu_aio_process_queue
Both unused after the previous patch.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/curl: Replace usleep by g_usleep
The function usleep is not available for all supported platforms:at least some versions of MinGW don't support it.
usleep was also declared obsolete by POSIX.1-2001.
The function g_usleep is part of glib2.0, so it is available for...
block: qemu_aio_get does not return NULL
Initially done with the following semantic patch:
rule1 expression E;statement S;@@ E = qemu_aio_get (...);(- if (E == NULL) { ... } |- if (E) { <... S ...> })
rule1
which however missed occurrences in linux-aio.c and posix-aio-compat.c....
block/curl: Don't finish AIOCBs too early
The previous behaviour was to finish AIOCBs inside curl_aio_readv()if the data was cached. This caused the following failed assertionat hw/ide/pci.c:314: bmdma_cmd_writeb
"Assertion `bm->bus->dma->aiocb == ((void *)0)' failed."...
block/curl: Implement a flush function on the fd handlers
Signed-off-by: Nick Thomas <nick@bytemark.co.uk>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/curl: Handle failed reads gracefully.
Current behaviour if a read fails is for the acb to not get finished.This causes an infinite loop in bdrv_read_em (block.c). The read failurenever gets reported to the guest and if the error condition clears, the...
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>
Fix %lld or %llx printf format use
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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...
don't dereference NULL after failed strdup
Most of these are obvious NULL-deref bug fixes, for example,the ones in these files:
block/curl.c net.c slirp/misc.c
and the first one in block/vvfat.c.The others in block/vvfat.c may not lead to an immediate segfault, but I...
block/curl: %Z is not a valid conversion specifier
Signed-off-by: malc <av1474@comtv.ru>
Do not use dprintf
dprintf is already claimed by POSIX1, and on at least one systemis implemented as a macro
[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Add qemu_aio_process_queue()
We'll leave some AIO completions unhandled when we can't call the callback.qemu_aio_process_queue() is used later to run any callbacks that are left andcan be run then.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix Sparse warning about "expression using sizeof on a function"
Allow adjustment of http block device's readahead size, via a new":readahead=###:" suffix.
Signed-off-by: Nolan Leake <nolan <at> sigbus.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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...
Add HTTP protocol using curl v6
Currently Qemu can read from posix I/O and NBD. This patch adds athird protocol to the game: HTTP.
In certain situations it can be useful to access HTTP data directly,for example if you want to try out an http provided OS image, but...