diff options
author | Nicholas Thomas <nick@bytemark.co.uk> | 2011-08-15 10:00:34 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-08-23 17:41:14 +0200 |
commit | f785a5ae36c92fbeb8e0e8c9d71f5789cbce8b29 (patch) | |
tree | 77e2070775dbbe899b23f91b60e26761750968a3 /target-ppc/machine.c | |
parent | 3fba9d8198a50f69e80aba8458d26cf1654e6e26 (diff) |
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>
Diffstat (limited to 'target-ppc/machine.c')
0 files changed, 0 insertions, 0 deletions