From nobody Mon Feb 9 23:02:53 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1614327135; cv=none; d=zohomail.com; s=zohoarc; b=jRZeCfcTEutseTt0I7VzQOTHgTAQ/rjIaBHEDyhHEcmRc1WQjk2ysEXDjaqOgQmpE5BosjOApH49an6nUgNQqhy0XUkDFeJ2OD2bw52Xg8kBFqf4kLamoA2EqggxLBPDWwI8Go6uJ+Kf46in2w11gSQ3WEPQs5XW+dUW4IyWvUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614327135; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QvpruKzy7iRxPp+WZJ5J+qLhT0FlaXM1xbg2aJJPmEw=; b=NxeF+zADScLX0sI2DZWeziRNknMBpo1wa4A1IyXeqBvoDJAr//2ecpyXIybayWi5/HoGUGYbIc4algfT220olMWUmjVtYnxnDlJJXHic3wR76kXWWf08i+igXIewCyG3qG0j5++d/5nx8YdqxD3HbbUfq+iEVjRNbdjyA6NSYnQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614327135593282.99346846931803; Fri, 26 Feb 2021 00:12:15 -0800 (PST) Received: from localhost ([::1]:41970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFYEO-0007TK-W0 for importer@patchew.org; Fri, 26 Feb 2021 03:12:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFY81-0001kE-AR for qemu-devel@nongnu.org; Fri, 26 Feb 2021 03:05:39 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:35821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFY7z-00046O-6D for qemu-devel@nongnu.org; Fri, 26 Feb 2021 03:05:36 -0500 Received: by mail-wr1-x42e.google.com with SMTP id l12so7666997wry.2 for ; Fri, 26 Feb 2021 00:05:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n66sm10700830wmn.25.2021.02.26.00.05.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 00:05:33 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=QvpruKzy7iRxPp+WZJ5J+qLhT0FlaXM1xbg2aJJPmEw=; b=nxyyN2v+QLCKsraT2/E3LPLe71TivsOK9VppdfpUoxeNE0nnqOgpI79qZaN3dSBLUa RsZ4xFvg7ZsYMzroS8jaqspNpfwFODOPIEFiRwMtxf8dL8dzBxtPgBaEp1Onlaco9xYe 4eJT3JmQ9jVlfHdDQIRm1hrkemrAauxTQFnFsqw6jQLXtkl1zzEGIuZh7bZUpRKEkjLk qFogatc7Acrzc+hZYwKgHTvkrnAp5SphKKG2NeNrZ8lSMTJ9DAsy5zoeFeGrl9AztCc+ 9ar/8lHweNeiqlAeq5ShkZDv4d8GhV3Yt4f0WaeyJxDbpEWUyLdwd8BWJ98diC7DhOf6 0qJw== 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:mime-version:content-transfer-encoding; bh=QvpruKzy7iRxPp+WZJ5J+qLhT0FlaXM1xbg2aJJPmEw=; b=fbbsQo0L5bLidrxaMjTitvXjpNZ9x5wneaRN86Fq5+0GnezJdnPVQe5h/kfwaVMWWz zMfruWZZJGf2ClsuZgdWsYDYohEz/7w+lSSpbDP3nFLuw0pGkTSMKNiCTyZ0FF6PIp8H DsfZvhUgr/y+b88x0YWs9bqQIhmlJaacGJIhm0tkU9OIHm06zuVvhaGnMk9/TNONzAwW uXz1QWcXk0ZEu0qx2BvYE/kn9w8/Qsm8zoejb7lDpl255B3xBRbAjDENIqhUxwI3/4SV 39iKGkwB6og3HH+3iW7Zf9pbCyYvATAIVj/RiIPDflxQfFlNfwqYEyETCgyFR2FfuroO OiRg== X-Gm-Message-State: AOAM530hWIt2kvyoTFVSg/qrEVQAgUKVi57l7YY3VIZD2PQhZIX+zm3W XPPnKLfu0BjNKRFekZL2/BjoexqgpMY= X-Google-Smtp-Source: ABdhPJxZ2KzNvpnX8F9XH+fwf2Ync52jwOuZ/7bDzRCNPI+Fw6QTolVBTYxG6wzxa+nfu1mkB4YegQ== X-Received: by 2002:adf:aa08:: with SMTP id p8mr1829595wrd.232.1614326733735; Fri, 26 Feb 2021 00:05:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 09/29] scsi-disk: do not complete requests early for rerror/werror=ignore Date: Fri, 26 Feb 2021 09:05:06 +0100 Message-Id: <20210226080526.651705-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210226080526.651705-1-pbonzini@redhat.com> References: <20210226080526.651705-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When requested to ignore errors, just do nothing and let the request complete normally. This means that the request will be accounted correctly. This is what commit 40dce4ee61 ("scsi-disk: fix rerror/werror=3Dignore", 2018-10-19) was supposed to do: Fixes: 40dce4ee61 ("scsi-disk: fix rerror/werror=3Dignore", 2018-10-19) Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 18ab777017..36aa872445 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -253,8 +253,7 @@ static bool scsi_handle_rw_error(SCSIDiskReq *r, int er= ror, 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; + return false; } =20 if (action =3D=3D BLOCK_ERROR_ACTION_STOP) { --=20 2.29.2