summaryrefslogtreecommitdiffstats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorJohn Snow2019-07-30 00:36:05 +0200
committerJohn Snow2019-08-17 01:14:04 +0200
commit8ec41c4265714255d5a138f8b538faf3583dcff6 (patch)
treecd6dbb89387cfe91c99b4dfa4fdb52ff27ea7089 /hw/ide/core.c
parentdma-helpers: ensure AIO callback is invoked after cancellation (diff)
downloadqemu-8ec41c4265714255d5a138f8b538faf3583dcff6.tar.gz
qemu-8ec41c4265714255d5a138f8b538faf3583dcff6.tar.xz
qemu-8ec41c4265714255d5a138f8b538faf3583dcff6.zip
Revert "ide/ahci: Check for -ECANCELED in aio callbacks"
This reverts commit 0d910cfeaf2076b116b4517166d5deb0fea76394. It's not correct to just ignore an error code in a callback; we need to handle that error and possible report failure to the guest so that they don't wait indefinitely for an operation that will now never finish. This ought to help cases reported by Nutanix where iSCSI returns a legitimate -ECANCELED for certain operations which should be propagated normally. Reported-by: Shaju Abraham <shaju.abraham@nutanix.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20190729223605.7163-1-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 38b6cdac87..e6e54c6c9a 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -723,9 +723,6 @@ static void ide_sector_read_cb(void *opaque, int ret)
s->pio_aiocb = NULL;
s->status &= ~BUSY_STAT;
- if (ret == -ECANCELED) {
- return;
- }
if (ret != 0) {
if (ide_handle_rw_error(s, -ret, IDE_RETRY_PIO |
IDE_RETRY_READ)) {
@@ -841,10 +838,6 @@ static void ide_dma_cb(void *opaque, int ret)
uint64_t offset;
bool stay_active = false;
- if (ret == -ECANCELED) {
- return;
- }
-
if (ret == -EINVAL) {
ide_dma_error(s);
return;
@@ -976,10 +969,6 @@ static void ide_sector_write_cb(void *opaque, int ret)
IDEState *s = opaque;
int n;
- if (ret == -ECANCELED) {
- return;
- }
-
s->pio_aiocb = NULL;
s->status &= ~BUSY_STAT;
@@ -1059,9 +1048,6 @@ static void ide_flush_cb(void *opaque, int ret)
s->pio_aiocb = NULL;
- if (ret == -ECANCELED) {
- return;
- }
if (ret < 0) {
/* XXX: What sector number to set here? */
if (ide_handle_rw_error(s, -ret, IDE_RETRY_FLUSH)) {