Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37495921rwd; Tue, 11 Jul 2023 15:23:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlGRHJLvR7+TVBpf4zEyiQ+Ij0qTTUGEkbFnK37Dz6TTgDlI+fudy0gxcrb2QTxlpiOoIzTw X-Received: by 2002:a17:90a:3b07:b0:262:fc8a:ed1 with SMTP id d7-20020a17090a3b0700b00262fc8a0ed1mr16838151pjc.44.1689114210410; Tue, 11 Jul 2023 15:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689114210; cv=none; d=google.com; s=arc-20160816; b=DhHkwSqONbnOtZlv723aIciCmJDdIcMAdAHU5+LkHX7d7tLTkB/OZI+OrvPT8ZlYex /B1IRJu9sBRZSxmkyIkwNushUxTg4eK1Xgj6KsmozZludd1ZvTY983FMA+62KslxBDeq 58B+XYfQAiYx/rsjcCPL7tsh2cIXbmELWrqEE8hhH1JNmTK0b/rLHejVG35HSRDwB4XD gTpENcEQTeZKdVCk8k2bgBCkC7selzWfivBT9C3sCG1c+wkg22ZzfRLYqhPPBD3HVBNa MCt0KMlYvHzfc0O2hwaJcSJLN9uJovswhfyM6rb/8Rp/ZG7tynQzj1hTqjC36n/thJp2 EelA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=22o7sJ4qMvAv+MYHGzcaJXVzraK0uhlI2bEFW2/yXhs=; fh=SyGSLnfAFOm0QwteqQXfHhvLzoQwpXB+qK7yhCvSQzc=; b=BQooSs5IChGJ9+t8wncm7jFhVHbI2EAGBhOT7GlIrO0CnGP0SqaMIQlKolZfYgBgif LgnbZUyUsC2KjTZHQWUTexABrVX/oAVIQAm71m4+jbiZwXS5OT2ewGAxlD2p4HvVvBuS WUyCtWJreJZk7Nwtla7+iXlxsmF9RTtomB3alPR6Re+KefSNHlZFOsL7GnqPf42qTMF7 gFMxaUKGPUrWomb95naeZjNTAwP9b2hPiyCDpvn5K93PKm38R69+rk/vGM18ZaKxCast 3M2maNXtsFv9MXAkW8utnju1W0g7m3bBU6veEdsgH5q5o/BZ9WdeSHL15nG0Om1+h8k/ aoWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DgvZvIqF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020a656257000000b0055bda24a17dsi1932536pgv.112.2023.07.11.15.23.18; Tue, 11 Jul 2023 15:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DgvZvIqF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231228AbjGKWIh (ORCPT + 99 others); Tue, 11 Jul 2023 18:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbjGKWIg (ORCPT ); Tue, 11 Jul 2023 18:08:36 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 575CD1705 for ; Tue, 11 Jul 2023 15:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689113273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=22o7sJ4qMvAv+MYHGzcaJXVzraK0uhlI2bEFW2/yXhs=; b=DgvZvIqFRHDZkwqpIbvRgX7bkqQ6AIcExp3tfbETDebBhahEbXkytIPywBJ6gponLE+9QF /5+Q9ckThEo1uyCNseeYv/qFSvBhId5ZkVzutwyuf4qMPnKWBlPma4cf1SBoYS5eNFLaDq w/oCjiZFbqv0HvsetclMUKbChFVtXto= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-323-XMfvtaptNeqoL_2kfIKVVA-1; Tue, 11 Jul 2023 18:07:48 -0400 X-MC-Unique: XMfvtaptNeqoL_2kfIKVVA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 53BDF185A791; Tue, 11 Jul 2023 22:07:47 +0000 (UTC) Received: from [10.22.16.29] (unknown [10.22.16.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BF1A40C6CD0; Tue, 11 Jul 2023 20:13:46 +0000 (UTC) Message-ID: <87b925cb-6393-ca9b-6549-b3ba85ad54fc@redhat.com> Date: Tue, 11 Jul 2023 18:07:46 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: Fwd: Need NVME QUIRK BOGUS for SAMSUNG MZ1WV480HCGL-000MV (Samsung SM-953 Datacenter SSD) Content-Language: en-US To: Keith Busch , Linus Torvalds Cc: Christoph Hellwig , Linux regressions mailing list , Pankaj Raghav , Bagas Sanjaya , Jens Axboe , Sagi Grimberg , "Clemens S." , Martin Belanger , Chaitanya Kulkarni , Hannes Reinecke , Linux Kernel Mailing List , Linux NVMe , Kanchan Joshi , Javier Gonzalez , =?UTF-8?B?67CV7KeE7ZmY?= References: <6f333133-2cc4-406a-d6c2-642ac6ccabca@leemhuis.info> <462e0e1e-98ea-0f3c-4aaa-8d44f0a8e664@leemhuis.info> <20230711120609.GB27050@lst.de> From: John Meneghini Organization: RHEL Core Storge Team In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yes, this is what I thought. This is all the result of the duplicate NID check added to deal with TP4034 Dispersed Namespaces. One suggestion I have would be to limit this check to nvme-of subsystems only. These are the only devices I am aware of out there which support TP4034. Moreover, all nvme-of devices report a valid NID. It's required with NVMe Over Fabrics. The PCIe devices, I expect, don't care. You don't really need a valid NID with a private namespace - which is what most PCIe devices are. I'll wager that if you change nvme_global_check_duplicate_ids() to check only nvme-of subsystems, and simply continue with PCIe subsystems, 90% of these nvme quirks can be removed. John Meneghini Senior Principal Platform Storage Engineer RHEL SST - Platform Storage Group jmeneghi@redhat.com On 7/11/23 13:21, Keith Busch wrote: > On Tue, Jul 11, 2023 at 09:47:00AM -0700, Linus Torvalds wrote: >> On Tue, 11 Jul 2023 at 05:06, Christoph Hellwig wrote: >> For example, we have this completely unacceptable garbage: >> >> ret = nvme_global_check_duplicate_ids(ctrl->subsys, &info->ids); >> if (ret) { >> dev_err(ctrl->device, >> "globally duplicate IDs for nsid %d\n", info->nsid); >> nvme_print_device_info(ctrl); >> return ret; >> } >> >> iow, the code even checks for and *notices* that there are duplicate >> IDs, and what does it do? It then errors out. > > This check came from a recent half-baked spec feature called "Dispersed > Namespaces" that caused breakage and data corruption when used in Linux. > Rather than attempt to support that mostly vendor specific feature, the > driver attempted to fence that off as unmaintainable. This check wasn't > aimed at enforcing "correctness", but it certainly found a lot of that > as collatoral damage. Let's see if we can find a better way to detect > the difference with a sane fallback as you suggest. >