From nobody Tue May 7 05:35:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564439810; cv=none; d=zoho.com; s=zohoarc; b=KLPXadL0tL5fCMkXBquhwYRZZx84jqNVHsYoXVgq93EQBM62YIedkCIkmVEsGIVAbTJkV2vjoh7DdwvL1fxR2IDkVj/cXDx4+wFlV4seMm4JqNWh7FTzyY35cFY9G/q8q81Z1o1JZ6k0Dt8CI/6omVa/AwCFm294b2NvMYvwg/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564439810; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=+nCdCEgY4KgCic8f2CFnCR1BNk46WJluHwmQCjZvcrk=; b=gR9wpYdgucU94vYh8/IE3SR4Np+QEfoLx0fBA2FC0sZAoB+jH/P7WgY8XVO+go6lRsGLRA6dqIZs9Q5dd72ANgARH34zejLqTMAUfKk7rgr/9F0N+lMcu4MWBwSsOiymCqJeVssFnH+pma4VH5AY0lYqVWPRq5/BVkyc99awUgs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1564439810634649.4760513222998; Mon, 29 Jul 2019 15:36:50 -0700 (PDT) Received: from localhost ([::1]:56804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsEFy-00036h-Sp for importer@patchew.org; Mon, 29 Jul 2019 18:36:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41769) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsEFY-0002bY-Ar for qemu-devel@nongnu.org; Mon, 29 Jul 2019 18:36:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsEFX-00035Y-DX for qemu-devel@nongnu.org; Mon, 29 Jul 2019 18:36:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38516) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsEFV-00034j-8O; Mon, 29 Jul 2019 18:36:09 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 783DEC057F2C; Mon, 29 Jul 2019 22:36:08 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-74.bos.redhat.com [10.18.17.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D26D19C58; Mon, 29 Jul 2019 22:36:05 +0000 (UTC) From: John Snow To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Mon, 29 Jul 2019 18:36:05 -0400 Message-Id: <20190729223605.7163-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 29 Jul 2019 22:36:08 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] Revert "ide/ahci: Check for -ECANCELED in aio callbacks" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Shaju Abraham , John Snow , qemu-stable Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: John Snow --- hw/ide/ahci.c | 3 --- hw/ide/core.c | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 00ba422a48..6aaf66534a 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1023,9 +1023,6 @@ static void ncq_cb(void *opaque, int ret) IDEState *ide_state =3D &ncq_tfs->drive->port.ifs[0]; =20 ncq_tfs->aiocb =3D NULL; - if (ret =3D=3D -ECANCELED) { - return; - } =20 if (ret < 0) { bool is_read =3D ncq_tfs->cmd =3D=3D READ_FPDMA_QUEUED; diff --git a/hw/ide/core.c b/hw/ide/core.c index 6afadf894f..8e1624f7ce 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -722,9 +722,6 @@ static void ide_sector_read_cb(void *opaque, int ret) s->pio_aiocb =3D NULL; s->status &=3D ~BUSY_STAT; =20 - if (ret =3D=3D -ECANCELED) { - return; - } if (ret !=3D 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 =3D false; =20 - if (ret =3D=3D -ECANCELED) { - return; - } - if (ret =3D=3D -EINVAL) { ide_dma_error(s); return; @@ -975,10 +968,6 @@ static void ide_sector_write_cb(void *opaque, int ret) IDEState *s =3D opaque; int n; =20 - if (ret =3D=3D -ECANCELED) { - return; - } - s->pio_aiocb =3D NULL; s->status &=3D ~BUSY_STAT; =20 @@ -1058,9 +1047,6 @@ static void ide_flush_cb(void *opaque, int ret) =20 s->pio_aiocb =3D NULL; =20 - if (ret =3D=3D -ECANCELED) { - return; - } if (ret < 0) { /* XXX: What sector number to set here? */ if (ide_handle_rw_error(s, -ret, IDE_RETRY_FLUSH)) { --=20 2.21.0