Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1258034iob; Fri, 29 Apr 2022 00:56:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNsMeEcpxQiUWP5J6gddZHdSBwwjLj8e5YxdDMxrPZYzqhRaLkdllDj5H9Ej/1DQUsXmDs X-Received: by 2002:aa7:83c2:0:b0:505:723f:6ace with SMTP id j2-20020aa783c2000000b00505723f6acemr39074390pfn.86.1651218962123; Fri, 29 Apr 2022 00:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651218962; cv=none; d=google.com; s=arc-20160816; b=VHcTnoEnDsbRfTsy1tcgpiJieKweoOKKHS88BV30RqKtsRdgiWbzeIFkj2Ri9ALgQH xbiJDBlhGbrXULv/lVraJm/GRxltptWcF72/IS7jncNYr3pL6UgGoqXiC67GYFxVwSLk Cqyr0spO9xdUTl6XHfxyEpBf4euFswm0+uANNo8/Qbi5ps7TIHk1u/B0lzATMO+B4Fud x1BY02mG8ujXUn26ig5NQTHJzNIWrz0o+2SpJyPy0hk9ngDTChxflLQ2sYEwvusLLOBP yGjSjKWUfQZPx9p5CimI6M+JW4IbVM0rVL8+NfQpCtIrDd/ezeY9CWSgsA/soIjsgPsX fXYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=Ka1t7no9jjgUcfH8S2WwXx8TxVIF3T9cqY0GZcM1HQs=; b=0ZN7wCUUXCFTKlnVY2QYlRkx9RR2VrASUHM9bWS3L3s4yjmaJnjcbvArjIGHBjUYmW Vu6fsqLmScbNbHtQseNmkMH9hMc5LfjJn8Ce6FhxNCZ1dvLqy3YNsMHRj99tEvpzgYbs 2pOFPYcguq0RTQy4H07PIMBrkdwEk6naL1zT7BG8iLW/woHut34Oxugv8AYtSzzoSjqm mzDahr5jbE7dUp+6lu3mQoCXFiR7bgJAHkx0e/0cNqcdqZzzkHd2TgV6YRGWT6ssecBa 82uauxTcGcrDC9VY4leUkc4a++65Rh12O5repWYi7Y5DnUI8BggVFBT5Ye2p5NdQgQFf JOfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=QNiptTeM; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca17-20020a17090af31100b001d297b4e1a9si6107333pjb.166.2022.04.29.00.55.47; Fri, 29 Apr 2022 00:56:02 -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=@samsung.com header.s=mail20170921 header.b=QNiptTeM; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350225AbiD1THo (ORCPT + 99 others); Thu, 28 Apr 2022 15:07:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242171AbiD1THn (ORCPT ); Thu, 28 Apr 2022 15:07:43 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28EE2BAB8D for ; Thu, 28 Apr 2022 12:04:26 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20220428190421euoutp01c1c2df23434df1b5a3ab4a4422641f7d~qJMmenPdI0497304973euoutp01K for ; Thu, 28 Apr 2022 19:04:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20220428190421euoutp01c1c2df23434df1b5a3ab4a4422641f7d~qJMmenPdI0497304973euoutp01K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1651172661; bh=Ka1t7no9jjgUcfH8S2WwXx8TxVIF3T9cqY0GZcM1HQs=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=QNiptTeMbhbENQ7lqTSzyfCjI6ePPmJJUXrEVqNpOIq54KQXAb+EGst0UqkqqH8o9 dzvq0PQZvOqIiO/1nSydB4HJW4PZCKsDmJpnfVBQUqD/X7nKYW779JXUuoyiXFt0Yc h0N0Vdpzgq//VPvy3jx0daVCdFpSvY5nOVALX+v0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220428190420eucas1p2697d4e084b5620b5a545de03882e0b69~qJMlOzo5d0353803538eucas1p2l; Thu, 28 Apr 2022 19:04:20 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 8C.8C.10009.435EA626; Thu, 28 Apr 2022 20:04:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220428190419eucas1p27c883bc99b03909b2590aa28b08f8efe~qJMk0fbyr0370603706eucas1p2S; Thu, 28 Apr 2022 19:04:19 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220428190419eusmtrp293b0a0cd417e1aa523f302732b47f2f6~qJMky7PiZ0718707187eusmtrp2w; Thu, 28 Apr 2022 19:04:19 +0000 (GMT) X-AuditID: cbfec7f2-e7fff70000002719-41-626ae5346cac Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id FF.0F.09404.335EA626; Thu, 28 Apr 2022 20:04:19 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220428190419eusmtip14d451737adfaf87d199d4216331b65c2~qJMkmfsEc2896528965eusmtip1b; Thu, 28 Apr 2022 19:04:19 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.162) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 28 Apr 2022 20:04:17 +0100 Message-ID: Date: Thu, 28 Apr 2022 21:04:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 04/16] block: allow blk-zoned devices to have non-power-of-2 zone size Content-Language: en-US To: Damien Le Moal , , , , , , , , , CC: , , , , , , , , , , , , , From: Pankaj Raghav In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.162] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA01Sf0xTVxjNfe/19VFTffxoeiOLM0WSjTm0CTHXzcFMiHlEExlRY8bcLPQF urVAWhnDDQaRH1KclEoZdiWumwOGRWhhOCBsWDNASq2mYABFZVDnIC1sQCzBdaM8XPjvnO98 5/u+c3MpPOw7cjulyDrDqrNkSgkpIDr7V1xvxnk+TtvbOxSOWof6cXRtsopEtQsrOHIYnBjS V9Xx0arThaO7/mIM/XjtNwzNtBpxdKFvgUD/aB+t1UqmcPRiSor09vsAeUaNGOqdeAO5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PUip79yrHwseFwQafbgwKezNpO83XV45PXPX9vr4eCf3W8bs T+2PHB/Wmi7r3BC9gsHuoVl49AH1S3x8S3a5JfhfDrp8NiNnicY/J9WYHSv/lnybd1KPYff9 XXvWvS4TVpWQ+Vjfs6x+jRJLcUaioRZzUXEiAGA0BFrqAwAA X-CMS-MailID: 20220428190419eucas1p27c883bc99b03909b2590aa28b08f8efe X-Msg-Generator: CA X-RootMTR: 20220427160300eucas1p1470fe30535849de6204bb78d7083cb3a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220427160300eucas1p1470fe30535849de6204bb78d7083cb3a References: <20220427160255.300418-1-p.raghav@samsung.com> <20220427160255.300418-5-p.raghav@samsung.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS autolearn=unavailable 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 2022-04-28 01:37, Damien Le Moal wrote: >> diff --git a/block/blk-core.c b/block/blk-core.c >> index 937bb6b86331..850caf311064 100644 >> --- a/block/blk-core.c >> +++ b/block/blk-core.c >> @@ -634,8 +634,7 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q, >> return BLK_STS_NOTSUPP; >> >> /* The bio sector must point to the start of a sequential zone */ >> - if (pos & (blk_queue_zone_sectors(q) - 1) || >> - !blk_queue_zone_is_seq(q, pos)) >> + if (!blk_queue_zone_aligned(q, pos) || !blk_queue_zone_is_seq(q, pos)) > > blk_queue_zone_aligned() is a little confusing since "aligned" is also > used for write-pointer aligned. I would rename this helper > > blk_queue_is_zone_start() > > or something like that. > That is a good idea and definitely a better name that blk_queue_zone_aligned. I will fix it. >> /* >> @@ -489,14 +489,14 @@ static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx, >> * smaller last zone. >> */ >> if (zone->start == 0) { >> - if (zone->len == 0 || !is_power_of_2(zone->len)) { >> - pr_warn("%s: Invalid zoned device with non power of two zone size (%llu)\n", >> - disk->disk_name, zone->len); >> + if (zone->len == 0) { >> + pr_warn("%s: Invalid zoned device size", >> + disk->disk_name); > > The message is weird now. Please change it to "Invalid zone size". > Ok. > Also, the entire premise of this patch series is that it is hard for > people to support the unusable sectors between zone capacity and zone end > for drives with a zone capacity smaller than the zone size. > > Yet, here you do not check that zone capacity == zone size for drives that > do not have a zone size equal to a power of 2 number of sectors. This > means that we can still have drives with ZC < ZS AND ZS not equal to a > power of 2. So from the point of view of your arguments, no gains at all. > Any thoughts on this ? > That is a good point. Instead of implicitly assuming npo2 drives to have ZC == ZS, it is better to be explicit during bringup. Thanks. As Luis mentioned, I will add this condition in the next revision.