Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4101486rwb; Tue, 16 Aug 2022 14:40:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR6+vxj0mkkGlDeJIF6p4BKa2gwl7Ys+4NSkfjwbun0rcYOq9AjWiD1WrPqMYczaqcVQkGOp X-Received: by 2002:a17:90b:38c2:b0:1fa:5d1f:d1f6 with SMTP id nn2-20020a17090b38c200b001fa5d1fd1f6mr535361pjb.159.1660686056055; Tue, 16 Aug 2022 14:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660686056; cv=none; d=google.com; s=arc-20160816; b=JMXGX0hLuMqIewuNJNaf9LnGs15CjNMMLmFAih7MulQ4/PkneS7M80TQMxaKScrFXF 5uHGB0Ox3eWJ7GESLi0shUc10/e+rqkAmN0VQkYK4oPPxBA82YmFruvFVOOu7KHNHaQm xIQ8kJAsDYoc7YtYBT5TVwrAo9IrNA7U7GmZOM046OUhlrNdMCAmedRA4r9kuI2SYXpj 5gPk+qtd5+h5akHbQDkAvDburzq3hkSkZ+j2pZcTVxnmKDEbqYX5GUH6iEs+Yg5VmewX 7EaAZk72agz/FY55wvRLVED2EoUb/RzqTMX34IGgUxlG8UzYtGzRsASt4wnibMF2ROi1 FVUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dlmkCHwvDqI7TrthDWzwPnDA00fDNxdw3pPu/XeTTCc=; b=FYtDRUtdx1wG229q6hQaYAqhY9WJlA+rK7CZgiooxlecW/0KBb4hnjSezXL5+NSJOd zIAL56/Dwuae8jwgT6cHYqUOGbpseD+uiwotYAn+6Qb+Udkota7WDBkkzdgn1qSNAEzA 37YyYQSaacZ/6MntGueGvD8myYdck8lUxOweKVWojx/oX+S9PnxwjpqqqpZq7+VZoMx5 x6v0/3MtTBGhty1nAs3c3Izc2kG2Zm0B6DHlCtYNyBkBqIYqMB5Obl8Da34r/lcvF/A0 LM9rCzd5wlzoO3JAbyBsJwAOpeI1yubyU+T/LcraifzYWDg1FD7ek0CyeURa52ofEKKg MlXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fNvpog6N; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a621607000000b0052542cfb5c4si13748917pfw.235.2022.08.16.14.40.44; Tue, 16 Aug 2022 14:40:56 -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=@kernel.org header.s=k20201202 header.b=fNvpog6N; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237460AbiHPVOr (ORCPT + 99 others); Tue, 16 Aug 2022 17:14:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237433AbiHPVOq (ORCPT ); Tue, 16 Aug 2022 17:14:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 341F2792F0; Tue, 16 Aug 2022 14:14:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DB9BEB81AF5; Tue, 16 Aug 2022 21:14:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 416BFC433D6; Tue, 16 Aug 2022 21:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660684482; bh=m0n9HY+gqxmJTWtx8pVWHb4MyNuPPxntKDcT0U/yHjo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fNvpog6Ne0DR3YdxWE9freAnZ7a2ReiwVLY1m4s5+zot9uAgmDME/NRiby+5oJOAD xzLoKSbrGeG+66XxwECTjXfQRZQOahXKh4KuXGfa8jyHRYf0bL2bIZAl1uL7ehpHqf tvXiK+xqK0OmYOlowdq6ZKR5zPxWbAfJzCVG4z3NTzpD/MYv0cdkCKIGc4b80N29iR naZME4/PnOZ9ioia8+1c+a64iK74vcAX2tv0A12Sg1dMYr28pky3mv5FI8PtHLWw7b ktQ/952RKdm6J2LIsUrK1UXpm7Ju0epIjKmgeN0lAVRcUKZ/7pnD0DYiF4+v2iFK8k 1UbsVnRZsNfJg== Date: Tue, 16 Aug 2022 15:14:38 -0600 From: Keith Busch To: Pankaj Raghav Cc: snitzer@kernel.org, axboe@kernel.dk, hch@lst.de, agk@redhat.com, damien.lemoal@opensource.wdc.com, linux-block@vger.kernel.org, Johannes.Thumshirn@wdc.com, bvanassche@acm.org, matias.bjorling@wdc.com, hare@suse.de, gost.dev@samsung.com, linux-nvme@lists.infradead.org, jaegeuk@kernel.org, pankydev8@gmail.com, linux-kernel@vger.kernel.org, dm-devel@redhat.com, Luis Chamberlain Subject: Re: [PATCH v10 05/13] nvme: zns: Allow ZNS drives that have non-power_of_2 zone size Message-ID: References: <20220811143043.126029-1-p.raghav@samsung.com> <20220811143043.126029-6-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220811143043.126029-6-p.raghav@samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 On Thu, Aug 11, 2022 at 04:30:35PM +0200, Pankaj Raghav wrote: > @@ -101,13 +101,6 @@ int nvme_update_zone_info(struct nvme_ns *ns, unsigned lbaf) > } > > ns->zsze = nvme_lba_to_sect(ns, le64_to_cpu(id->lbafe[lbaf].zsze)); > - if (!is_power_of_2(ns->zsze)) { > - dev_warn(ns->ctrl->device, > - "invalid zone size:%llu for namespace:%u\n", > - ns->zsze, ns->head->ns_id); > - status = -ENODEV; > - goto free_data; > - } We used to bail out early if the format wasn't supported, which wouldn't create the namespace. Now you are relying on blk_revalidate_disk_zones() to report an error for invalid format, but the handling for an error there is different: the namespace still gets created. I'm not sure if that's a problem, but it's different.