Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3197414pxj; Mon, 24 May 2021 00:38:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgPYoYIAG8mVKllGOL2u/0kh/jCam0Wiy7WbGEFFWE2rK42zTH9WlY3pF2FZsiyWb8QPQW X-Received: by 2002:a17:907:7283:: with SMTP id dt3mr21761488ejc.253.1621841907123; Mon, 24 May 2021 00:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621841907; cv=none; d=google.com; s=arc-20160816; b=U3GwqUXqrQN5cCBn6jOoZQVloDuUnKHoyNiOjBck4y8TyULLqKMNG2BRQjZHnc22x0 uV7WUeXkrBrfAruqtAmVA4o4J5MsTK0jo64QQXvUvcdSjcI22Z/NwJDXD7ueyolW+Zr7 QCgmRTTGbDEIglCJLdNciyfQF8HR9vslxyEOxmRpoKpWD/6pJ68I8LGB1lsQmeecPFrz q71oWp9YrPDBvVlMncYir/6WSyeVWe2OwQ320HoHuTjg5A91sTwvKdFIa6v8LDyehwk6 dZDTF2VWpYht6T4hlv8Yi5HKxpHsE66GXZ96gWKbAWVaSEN0+tedvomYWGDiiYqMVnWk oO9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SEHns7dssjp0X69zwMpCpGUDntYh/cK2I+PLpAPwGFo=; b=gLBsOxGKqceHrBi56uSgZdG4o7r+VFzHOEqhterc2zO/602kMkbrfNNyxT1PvgMMWg rIvU3Ui/W4EBMlja8BbXommSH0oxD5onoa/X6gfXPK2c6FYeqTnRQ6cnyc8+kvQZoHt3 nBlJQGBbC9UYDFSlnmYpz1Wr/YDNMRaOl5Izc1A9voX8dYBXb8zD2ZskHIjfAp8mFSxO 9D4QzxIHj4n1LyWYoh8SYbBC8qqEISbWSPRmB8wXiZg0ahO8k/3P3pGSPhAI7ouE0imE eZedWuD4v7WzuoZrPPCjYsfvWiWB8Yfe8hLbMamXyzd7aKI8izsE0Gj2FqU5XHsUwspY 1NEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qh20si5763414ejb.303.2021.05.24.00.38.04; Mon, 24 May 2021 00:38:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232347AbhEXHie (ORCPT + 99 others); Mon, 24 May 2021 03:38:34 -0400 Received: from verein.lst.de ([213.95.11.211]:53564 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232266AbhEXHie (ORCPT ); Mon, 24 May 2021 03:38:34 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5756668AFE; Mon, 24 May 2021 09:37:05 +0200 (CEST) Date: Mon, 24 May 2021 09:37:03 +0200 From: Christoph Hellwig To: Sagi Grimberg Cc: Keith Busch , Daniel Wagner , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig Subject: Re: [PATCH] nvme: Use NN for max_namespaces if MNAN is zero Message-ID: <20210524073703.GA24372@lst.de> References: <20210521144734.90044-1-dwagner@suse.de> <20210521145306.ld7jc6alchimyzny@beryllium.lan> <20210521152702.GB29013@redsun51.ssa.fujisawa.hgst.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 01:19:26PM -0700, Sagi Grimberg wrote: > >>> Forgot to mention: During testing dynamically adding namespaces it was >>> possible to trigger the WARNINGs in the nvme_parse_ana_log(). Initially >>> the subsystem started with 8 namespaces and during runtime another 8 >>> namespaces was added. >> >> The controller is required to have a non-zero MNAN value if it supports >> ANA: >> >> If the controller supports Asymmetric Namespace Access Reporting, then >> this field shall be set to a non-zero value that is less than or equal >> to the NN value. > > That was my thought exactly I think we should add a sanity check for that and reject the broken controller if that is not the case rather than working around it.