From nobody Wed Apr 1 23:46:38 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1774969488; cv=none; d=zohomail.com; s=zohoarc; b=bv5HSDZSPBj6WvwP7kRrpJQpXzKjc/fmN98aq/v8IIzhxTqgm4Zrux0VNghVPGkiCS+wibV95UZLAdfJQsPfCjWTobFEHzu//T78fjvwD1uCg/3/R2rY5LjC8ukErckj0UMwRJjK+zTugEANKiynOjMqf1nL/bkk3+ywjB0CfFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774969488; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vJPIebSvHta1IUQzeqCUFPwZpsWjYN1JQlABtV3dR5o=; b=IEJ9KfwTrEW848xnmLkXgHS5+6P3q88zBoWku3xKVwMcROEBzBHK8IYwdzEs8epLbkn1/mRPzsDvyZe2RrKcDf5Rfelmx9g/E3ECh3EohtlIS5/ebK+fKhRbxQ1zDEu0hsjc9ehf44wr02ojI/zqNZNik5rKCqyXdYFIU+YdOz4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1774969488711202.27947544522488; Tue, 31 Mar 2026 08:04:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w7adX-0003G6-RF; Tue, 31 Mar 2026 11:04:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w7adV-0003Bu-D7 for qemu-devel@nongnu.org; Tue, 31 Mar 2026 11:04:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w7adT-0002Xt-Jl for qemu-devel@nongnu.org; Tue, 31 Mar 2026 11:04:09 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-sTovVP-JP0WenJ1z7xIUlA-1; Tue, 31 Mar 2026 11:04:02 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 890D3195607D; Tue, 31 Mar 2026 15:04:01 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.44.50.38]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 28EBA1954102; Tue, 31 Mar 2026 15:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774969446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vJPIebSvHta1IUQzeqCUFPwZpsWjYN1JQlABtV3dR5o=; b=KjHFuoRdlavu8Jb4BiwLtkcfCED/E7PN5DOpiKkFsXkwjrZddHVKmcmrmMsdrESTUlIhXb J0uJSpmMWiTFQ0msjnEO3hQMD/YwMDtMk+XTYU68In8KOZVkhvIyrgT1nWMDA3Liml7Idn C0w7vNRmLtrZZHs5Bv9UtrLZG2GoMiQ= X-MC-Unique: sTovVP-JP0WenJ1z7xIUlA-1 X-Mimecast-MFC-AGG-ID: sTovVP-JP0WenJ1z7xIUlA_1774969441 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org, peter.maydell@linaro.org Subject: [PULL 2/6] scsi: Don't consider LOGICAL UNIT NOT SUPPORTED guest recoverable Date: Tue, 31 Mar 2026 17:03:48 +0200 Message-ID: <20260331150352.256332-3-kwolf@redhat.com> In-Reply-To: <20260331150352.256332-1-kwolf@redhat.com> References: <20260331150352.256332-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=170.10.133.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.01, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, SPF_HELO_PASS=-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.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1774969490132154101 Content-Type: text/plain; charset="utf-8" When commit bdf9613b introduced scsi_sense_buf_is_guest_recoverable(), it included LOGICAL UNIT NOT SUPPORTED in the list of guest recoverable sense codes. It doesn't really explain how the codes to be in the list were selected. As the LUN doesn't come from the guest, but from the block backend (usually the SCSI device on the host that was opened with host_device, but it could also be the iscsi block driver), there is really no way the guest could influence this. It seems that on some storage arrays, LOGICAL UNIT NOT SUPPORTED can happen during failover operations. When combined with multipath, the request should be retried on another path instead of being reported to the guest, which would offline the filesystem in response. Simply returning false in scsi_sense_buf_is_guest_recoverable() will enable the retry logic in file-posix, and will also make sure that if the error persists, the configured error policy is respected so that the VM can be stopped. Buglink: https://redhat.atlassian.net/browse/RHEL-158212 Fixes: bdf9613b7f87 ('scsi: explicitly list guest-recoverable sense codes') Signed-off-by: Kevin Wolf Message-ID: <20260330121635.49205-1-kwolf@redhat.com> Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- scsi/utils.c | 1 - 1 file changed, 1 deletion(-) diff --git a/scsi/utils.c b/scsi/utils.c index 545956f4f95..daee90ecf0e 100644 --- a/scsi/utils.c +++ b/scsi/utils.c @@ -373,7 +373,6 @@ static bool scsi_sense_is_guest_recoverable(int key, in= t asc, int ascq) case 0x1a00: /* PARAMETER LIST LENGTH ERROR */ case 0x2000: /* INVALID OPERATION CODE */ case 0x2400: /* INVALID FIELD IN CDB */ - case 0x2500: /* LOGICAL UNIT NOT SUPPORTED */ case 0x2600: /* INVALID FIELD IN PARAMETER LIST */ =20 case 0x2104: /* UNALIGNED WRITE COMMAND */ --=20 2.53.0