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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 180B7C433E0 for ; Thu, 28 Jan 2021 09:36:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF08661492 for ; Thu, 28 Jan 2021 09:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232480AbhA1JfP (ORCPT ); Thu, 28 Jan 2021 04:35:15 -0500 Received: from verein.lst.de ([213.95.11.211]:56674 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231810AbhA1JdY (ORCPT ); Thu, 28 Jan 2021 04:33:24 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 13FDC68AFE; Thu, 28 Jan 2021 10:32:41 +0100 (CET) Date: Thu, 28 Jan 2021 10:32:40 +0100 From: Christoph Hellwig To: Damien Le Moal Cc: Christoph Hellwig , "linux-block@vger.kernel.org" , Jens Axboe , "linux-scsi@vger.kernel.org" , "Martin K . Petersen" , "linux-nvme@lists.infradead.org" , Keith Busch , Chaitanya Kulkarni Subject: Re: [PATCH v4 2/8] nvme: cleanup zone information initialization Message-ID: <20210128093240.GA3212@lst.de> References: <20210128044733.503606-1-damien.lemoal@wdc.com> <20210128044733.503606-3-damien.lemoal@wdc.com> <20210128091710.GA1959@lst.de> 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-block@vger.kernel.org On Thu, Jan 28, 2021 at 09:27:41AM +0000, Damien Le Moal wrote: > > I tried that first, but it did not work. I end up with > blk_revalidate_disk_zones() undefined error with !CONFIG_BLK_DEV_ZONED. > This is because blk_queue_is_zoned() is *not* stubbed for !CONFIG_BLK_DEV_ZONED. > It will simply always return 0/none in that case. We would need to have: Hmm. blk_queue_is_zoned is calls blk_queue_zoned_model, which always returns BLK_ZONED_NONE for !CONFIG_BLK_DEV_ZONED, and I thought we rely on that elsewhere in nvme. That is a fairly recent change from me, though. > > if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) && blk_queue_is_zoned()) { > ret = blk_revalidate_disk_zones(ns->disk, NULL); > ... > > Or stub blk_queue_is_zoned()... If the above really doesn't work we should properly stub it out. Anyway, I think we can go with your current patch: Reviewed-by: Christoph Hellwig and refine all the zoned stubs later. I have a few more ideas for improvements there anyway.