Revert "ide/ahci: Check for -ECANCELED in aio callbacks"
This reverts commitstable-4.10d910cfeaf
. 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> (cherry picked from commit8ec41c4265
) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
parent
fbde196c30
commit
73a5bf4729
|
@ -1023,9 +1023,6 @@ static void ncq_cb(void *opaque, int ret)
|
|||
IDEState *ide_state = &ncq_tfs->drive->port.ifs[0];
|
||||
|
||||
ncq_tfs->aiocb = NULL;
|
||||
if (ret == -ECANCELED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
bool is_read = ncq_tfs->cmd == READ_FPDMA_QUEUED;
|
||||
|
|
|
@ -722,9 +722,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)) {
|
||||
|
@ -840,10 +837,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;
|
||||
|
@ -975,10 +968,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;
|
||||
|
||||
|
@ -1058,9 +1047,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)) {
|
||||
|
|
Loading…
Reference in New Issue