Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1610616iog; Thu, 16 Jun 2022 09:49:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tUKe5KO92ubGXC2jqgmfLVg8PsXieFgyR2EP5Xo2TMVTj5U240/SJn84Db13QI2VvE4RRN X-Received: by 2002:a05:6402:1488:b0:431:56cb:bbc5 with SMTP id e8-20020a056402148800b0043156cbbbc5mr7474168edv.199.1655398190772; Thu, 16 Jun 2022 09:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655398190; cv=none; d=google.com; s=arc-20160816; b=PeAYYnDUK7rUIw+pwu0UtNVFkfum0SXxNxzfOKZ2gj5vqXDXofZCXW4ZIRG60UWLxG gnSZ9FxOPLRMHvN8w4EwsjoLnTNs87NmqgMJFQslWvM1qTQQDpra366RFY7QTrfmA65j zXYwR2JNfniaUaLpHkGE3oiEuy/SH7soUdaYWth0tNzDF1/YlMxceBFBddH3dk1wZeQT 6WIqiOb4LMb0hc/GAOZzjBqOPctdaVN8cIcRFXNV01zsFqOc9eZ9xRsEUM4+kDG9Gq7V Cy6ywqezDPz2bcRFTGkaiVCJmW1pI6jCzlKPk2r9tV9rlBpEUTU44jgufRjCM2Z5Sfy6 wu7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bewGKNu60ce93OglEfrUE0YxII8yhxsWSngVzrxtmZs=; b=XDNJHdDv/n6mjGLhyewqw+RFvjQrZwUbvtV9rShG4V2NLJHQ26+s92ygB+7WXNkMdA JVZhuNHvO+MTr0eGuVSCS8ZtCl/qzUBkNjpT7XXW8ezV9jGckIh2WalgRLVPtLQkOXtq niLzTsf4ir41lC0GBvfDgjAUP30qSqo2vR1/zjCp/WfRlq94Km3zqyPk1icgLhXu1uD4 pZeLS4Ef+oddHKvn2OKxNAArkIkkzkuZapkKiZ8PvViyjv4ig4DnnVq3SQR6mPzwZ1sl cNeyH25l1hmZ7cU5r9rdluemRJMZSgsgA+a+Mh7NwgYoYY7I2g7xkSRjDIGL94gBekyu cCcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Bfso75br; 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 s5-20020a17090699c500b0070f509be43csi245332ejn.874.2022.06.16.09.49.23; Thu, 16 Jun 2022 09:49:50 -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=@infradead.org header.s=bombadil.20210309 header.b=Bfso75br; 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 S1377702AbiFPQFE (ORCPT + 99 others); Thu, 16 Jun 2022 12:05:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232898AbiFPQFC (ORCPT ); Thu, 16 Jun 2022 12:05:02 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD04F30578; Thu, 16 Jun 2022 09:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description; bh=bewGKNu60ce93OglEfrUE0YxII8yhxsWSngVzrxtmZs=; b=Bfso75brsL0PA8G7DnzukMeP40 /k+2S7PXG0068vdmUqDgKC6b+bor9SV8jqrAqw7PTXorXgvlX9/y/QozRebL3mcu7GCWaXDNlaTUY LzQoK/SPHMuX44AcvuR3yhhpVfMWo/ihIRRZhNGz9W72t5VRwo/e56RY1z+maT4idrsbwxP6883CZ LDCMgofIdu6HZUrFHQoN1HUj+9F6GhnaEQeNXmx1Jbv6JGn3i1GuIvJTxcDOUht+f5Dwncy0s5QcL qdI03X0OuDFY14icokQPlRCQNOdwM5EceFHgw2uMoiryw8MpJfzfKJnRpfKzjmLQzKR+TFPu+xDaM uCTmBY+g==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1rzE-003Jg0-9g; Thu, 16 Jun 2022 16:04:48 +0000 Date: Thu, 16 Jun 2022 09:04:48 -0700 From: Luis Chamberlain To: Pankaj Raghav Cc: Bart Van Assche , hch@lst.de, snitzer@redhat.com, damien.lemoal@opensource.wdc.com, axboe@kernel.dk, pankydev8@gmail.com, gost.dev@samsung.com, jiangbo.365@bytedance.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@redhat.com, jonathan.derrick@linux.dev, Johannes.Thumshirn@wdc.com, dsterba@suse.com, jaegeuk@kernel.org Subject: Re: [dm-devel] [PATCH v7 02/13] block: allow blk-zoned devices to have non-power-of-2 zone size Message-ID: References: <20220615101920.329421-1-p.raghav@samsung.com> <20220615101920.329421-3-p.raghav@samsung.com> <857c444a-02b9-9cef-0c5b-2ecdb2fd46f6@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, Jun 16, 2022 at 12:09:35PM +0200, Pankaj Raghav wrote: > On 2022-06-15 22:28, Bart Van Assche wrote: > >> +??????? if (!is_power_of_2(zone->len) && zone->capacity < zone->len) { > >> +??????????? pr_warn("%s: Invalid zone capacity for non power of 2 > >> zone size", > >> +??????????????? disk->disk_name); > >> ????????????? return -ENODEV; > >> ????????? } > > > > The above check seems wrong to me. I don't see why devices that report a > > capacity that is less than the zone size should be rejected. > > > This was brought up by Damien during previous reviews. The argument was > that the reason to allow non power-of-2 zoned device is to remove the > gaps between zone size and zone capacity. Allowing a npo2 zone size with > a different capacity, even though it is technically possible, it does > not make any practical sense. That is why this check was introduced. > Does that answer your question? Perhaps just add a comment because unless you are involved in the prior reviews this might not be clear. Luis