From nobody Thu Nov 6 06:15:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539424513661319.0502208817386; Sat, 13 Oct 2018 02:55:13 -0700 (PDT) Received: from localhost ([::1]:44340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBGdS-0003Go-Hu for importer@patchew.org; Sat, 13 Oct 2018 05:55:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBGc1-0002hl-6f for qemu-devel@nongnu.org; Sat, 13 Oct 2018 05:53:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBGc0-00015T-2s for qemu-devel@nongnu.org; Sat, 13 Oct 2018 05:53:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60450) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gBGbz-00015D-TE for qemu-devel@nongnu.org; Sat, 13 Oct 2018 05:53:32 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49A353084217 for ; Sat, 13 Oct 2018 09:53:31 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.112.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3661577392; Sat, 13 Oct 2018 09:53:29 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 13 Oct 2018 11:53:23 +0200 Message-Id: <1539424403-2884-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1539424403-2884-1-git-send-email-pbonzini@redhat.com> References: <1539424403-2884-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 13 Oct 2018 09:53:31 +0000 (UTC) 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 2/2] scsi-disk: fix rerror/werror=ignore X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: famz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" rerror=3Dignore was returning true from scsi_handle_rw_error but the caller= s were not calling scsi_req_complete when rerror=3Dignore returns true (this is the co= rrect thing to do when true is returned after executing a passthrough command). Fix th= is by calling it in scsi_handle_rw_error. Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 4074d7c..e2c5408 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -473,10 +473,15 @@ static bool scsi_handle_rw_error(SCSIDiskReq *r, int = error, bool acct_failed) } =20 blk_error_action(s->qdev.conf.blk, action, is_read, error); + if (action =3D=3D BLOCK_ERROR_ACTION_IGNORE) { + scsi_req_complete(&r->req, 0); + return true; + } + if (action =3D=3D BLOCK_ERROR_ACTION_STOP) { scsi_req_retry(&r->req); } - return action !=3D BLOCK_ERROR_ACTION_IGNORE; + return false; } =20 static void scsi_write_complete_noio(SCSIDiskReq *r, int ret) --=20 1.8.3.1