From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD38BC04FF3 for ; Mon, 24 May 2021 07:37:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADCC76108D for ; Mon, 24 May 2021 07:37:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232381AbhEXHif (ORCPT ); Mon, 24 May 2021 03:38:35 -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.