From nobody Tue Feb 10 02:42:45 2026 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; dkim=fail; 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539897882735421.6374629315553; Thu, 18 Oct 2018 14:24:42 -0700 (PDT) Received: from localhost ([::1]:44799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDFmb-00038E-KN for importer@patchew.org; Thu, 18 Oct 2018 17:24:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDEyO-0007Pr-6c for qemu-devel@nongnu.org; Thu, 18 Oct 2018 16:32:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDEyL-0006PF-LS for qemu-devel@nongnu.org; Thu, 18 Oct 2018 16:32:46 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:56242) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDEyL-0006MV-7a for qemu-devel@nongnu.org; Thu, 18 Oct 2018 16:32:45 -0400 Received: by mail-wm1-x336.google.com with SMTP id 206-v6so1557281wmb.5 for ; Thu, 18 Oct 2018 13:32:43 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-231-174.clienti.tiscali.it. [78.12.231.174]) by smtp.gmail.com with ESMTPSA id a12-v6sm14270952wrr.71.2018.10.18.13.32.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 13:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=8vioGhxmKBtQ1EeLzXWybw94Dw3VJdA1EuxaCfx2geM=; b=OpnnNKHWEdn77/WLRKbZJDUb65Y3idgEWgdB7ShZnFnIDZHZ6d9wxRJMiH5Jt8GXOn 2E1KLv3fXgrWxzBQt97536kdSAl+LUJToaVlelE5gDxfoE4id45IwERB8jsRA6016dGs v831TWVa/sZjcxc9RqNLQuOFcLXSSMIbuE3w56oYH93xSx+9bFphfQsARX5020rEUpS3 J9RG0fJN7Tw4Zm/MECAh8BpEwwxpEfFsxh1z+JeJfLf5qyHyWPPohblfnGtakP1VFu7Q 7B6BhPbRYMwMsTjywmb5kOPpPQhiItFfjw7iwgi3+hhqpJLSL4iEVDadVjTMr2Jum4Ul lL+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=8vioGhxmKBtQ1EeLzXWybw94Dw3VJdA1EuxaCfx2geM=; b=iOOy1352DZYUkoS+KoVonfwrMutJC5yF6QbbtEotoCvZT8GPCnXM+lujo3gcfEtO9R 8FR7TNdjoTN6kIsXf4alq6M7AFdGoyJSzDVKVD/2fXEBwtETC0fiDWwXNx+TpTYwzr6H CJkpFPmHKQTpJpi9/vYIKJrmKH0Y4nNCHDvqNXlnQi0GYaGhHjhiRSTQl9XixVxmO5Uu Y0W7nbh+QRzMAKzdfxlSajx9zGbwxZ0p7/h0AIxMtuEdH1hhmr1eBNEuOOWOKv150pW5 6TQyApXE4EJIqh3rkLcrN1H94/u3jWV9PskqLVvUhg6eRwu55Ou2ly2V8A0vaRMmRByO MV8A== X-Gm-Message-State: ABuFfoglOk41djEJOhmfrPCR3zSfy19HQqKBJwPet6o1HcFfQyWDMepY 7tkb03HGZ0n4X3Tq9HurCs7EevyK X-Google-Smtp-Source: ACcGV604J9wkWW3K51Rc3k/naN/nHCrM38g5px32OXh3F1TLpYdYlqlTpg+t/cSZ5/IinXR3F07Vzg== X-Received: by 2002:a1c:6308:: with SMTP id x8-v6mr1714187wmb.99.1539894762677; Thu, 18 Oct 2018 13:32:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 18 Oct 2018 22:31:50 +0200 Message-Id: <1539894735-14232-24-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539894735-14232-1-git-send-email-pbonzini@redhat.com> References: <1539894735-14232-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::336 Subject: [Qemu-devel] [PULL 23/48] 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 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