qemu-patch-raspberry4/block
Nicholas Thomas f785a5ae36 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 failure
never gets reported to the  guest and if the error condition clears, the
process never recovers.

With this patch, when curl reports a failure we finish the acb as a
failure. This results in the guest receiving an I/O error (rather than
the read hanging indefinitely) and if the error condition subsequently
clears, retries work as expected.

The simplest test is to put an ISO on a web server you have control over
and open it with qemu-io. Then move the ISO out of the way and attempt
to read some data - you should see behaviour matching the above.

Signed-off-by: Nick Thomas <nick@bytemark.co.uk>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-08-23 17:41:14 +02:00
..
blkdebug.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
blkverify.c block: avoid a warning on 64 bit hosts with long as int64_t 2010-11-04 13:54:37 +01:00
bochs.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
cloop.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
cow.c block: Allow bdrv_flush to return errors 2010-11-04 12:52:16 +01:00
curl.c block/curl: Handle failed reads gracefully. 2011-08-23 17:41:14 +02:00
dmg.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
nbd.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
parallels.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qcow.c qcow: initialize coroutine mutex 2011-08-23 14:15:17 +02:00
qcow2-cache.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qcow2-cluster.c qcow2: fix typo in documentation for qcow2_get_cluster_offset() 2011-08-23 14:15:17 +02:00
qcow2-refcount.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qcow2-snapshot.c qcow2: Fix DEBUG_* compilation 2011-08-23 14:15:17 +02:00
qcow2.c qcow2: Fix DEBUG_* compilation 2011-08-23 14:15:17 +02:00
qcow2.h qcow2: Use coroutines 2011-08-02 15:53:41 +02:00
qed-check.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-cluster.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-gencb.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-l2-cache.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-table.c async: Remove AsyncContext 2011-08-02 15:53:41 +02:00
qed.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed.h qed: Periodically flush and clear need check bit 2011-05-18 14:38:46 +02:00
raw-posix-aio.h Remove aio_ctx from paio_* interface 2009-10-30 08:39:34 -05:00
raw-posix.c raw-posix: Always check paio_init result 2011-08-01 12:10:29 +02:00
raw-win32.c w32: Fix qemu_ftruncate64 2011-08-22 10:19:00 -05:00
raw.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
rbd.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
sheepdog.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
vdi.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
vmdk.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
vpc.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
vvfat.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00