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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11B48C433F5 for ; Wed, 9 Mar 2022 14:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References: Content-Transfer-Encoding:Content-Type:In-Reply-To:From:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OYo7hf+j7VbA2i4lDyn2aZ5haP/s67p3rTw5NypDRC8=; b=PzFcJpa/4kckkS 9EULM4I3Q9mLSgI5UFDQfYTQlgq/KJnth0SDocZ2fNUH3KgCsBZ1fzA2lT3hHXp7H66H8GyeuH/Yv MEgUD/Cuy+fI9YhzontsOagw8jaPiJeNKipzRYkzmuWrckGbKY+DmFGbKqiuXoKs52jf7b21FjiO+ SzgCN5xn7z1xseevjsLlE4ghGpeDXz0jQlGkkjBfNv16vgIRy2jdgO/eIVOYHEL0+68QWnWjY1rN9 QmyDTaFGaYr3v/0KpLoZ8RhGKPpX2Uk9Dq4SVtAUkvc2hj6+3fWV6LlhMLHCbrKRQANKsYO9N29xH 0XpscdVYWtxF8cdRoHCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRwte-008rzH-AL; Wed, 09 Mar 2022 14:02:34 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRwta-008rxu-Ka for linux-nvme@lists.infradead.org; Wed, 09 Mar 2022 14:02:32 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220309140228euoutp02e2ab217224ff2a51a5b73963d2c02ea0~au0v1nf171546015460euoutp02T for ; Wed, 9 Mar 2022 14:02:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220309140228euoutp02e2ab217224ff2a51a5b73963d2c02ea0~au0v1nf171546015460euoutp02T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1646834548; bh=OYo7hf+j7VbA2i4lDyn2aZ5haP/s67p3rTw5NypDRC8=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=HOWLN6RYeDRftWnTIscl25s/Y7mCQD2ssKMIsoKxBwUXZU0n6LQFLidewzYhnAYTk cxGokNbTf7T1cKttThg+NTyrEXhQOxDPL4Q6tqW3XFhuw5ppDkviTK2PCHdf0HjQHA vWxhNp2Ba5YdeYAhQsKfGvCcH4clkY22Ow4UL4DI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220309140228eucas1p22f736b1a9b1b0cde9af9e10c21756789~au0vffTFx2329923299eucas1p2g; Wed, 9 Mar 2022 14:02:28 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id E4.6C.09887.473B8226; Wed, 9 Mar 2022 14:02:28 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220309140227eucas1p2d7733afa607ba7af585e0171a9fa5383~au0u9Y6NS2604726047eucas1p2H; Wed, 9 Mar 2022 14:02:27 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220309140227eusmtrp10eab4cdbbabaf54c7b622be71b3a2f03~au0u739Cf0233602336eusmtrp1M; Wed, 9 Mar 2022 14:02:27 +0000 (GMT) X-AuditID: cbfec7f4-471ff7000000269f-d8-6228b3746895 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 7A.2F.09404.373B8226; Wed, 9 Mar 2022 14:02:27 +0000 (GMT) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220309140227eusmtip1029aa127ba9cdbc9c49973a21aa12d4c~au0uv50W82915329153eusmtip1x; Wed, 9 Mar 2022 14:02:27 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.212) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 9 Mar 2022 14:02:23 +0000 Message-ID: Date: Wed, 9 Mar 2022 15:02:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 2/6] block: Add npo2_zone_setup callback to block device fops Content-Language: en-US To: Damien Le Moal , Luis Chamberlain , Adam Manzanares , =?UTF-8?Q?Javier_Gonz=c3=a1lez?= , kanchan Joshi , Jens Axboe , Keith Busch , Christoph Hellwig , Sagi Grimberg , =?UTF-8?Q?Matias_Bj=c3=b8rling?= , CC: Pankaj Raghav , Kanchan Joshi , , From: Pankaj Raghav In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.212] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDKsWRmVeSWpSXmKPExsWy7dj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v spjJqpF7dnqMWpbKkojjWWttz0ebu9m1dy5WW2PYedXXYcUNlaZnojNZPbPdymd8OsI8lytP +KDGjaQTfrZZs79O1wpctu3B6+gZCneL2rcesXFnktxuocRSnJFoqMVcVJwIAKPxTQeWAwAA X-CMS-MailID: 20220309140227eucas1p2d7733afa607ba7af585e0171a9fa5383 X-Msg-Generator: CA X-RootMTR: 20220308165428eucas1p14ea0a38eef47055c4fa41d695c5a249d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220308165428eucas1p14ea0a38eef47055c4fa41d695c5a249d References: <20220308165349.231320-1-p.raghav@samsung.com> <20220308165349.231320-3-p.raghav@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220309_060231_070288_DD321895 X-CRM114-Status: GOOD ( 20.05 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On 2022-03-09 04:46, Damien Le Moal wrote: > On 3/9/22 01:53, Pankaj Raghav wrote: >> A new fops is added to block device which will be used to setup the >> necessary hooks when a non-power_of_2 zone size is detected in a zoned >> device. >> >> This fops will be called as a part of blk_revalidate_disk_zones. > > And what does this new hook do ? You are actually not explaining it, nor > why it should be called from blk_revalidate_disk_zones(). I should have elaborated the "why" and "how" a bit more in my commit log. I will fix it in my next revision. The main idea why it was added and called as a part of blk_revalidate_disk_zones is this: As the block layer expects the zone sizes to be po2, this fops can be used by the driver to configure a npo2 device to be presented as a po2 device before the parameters such as zone bitmaps and chunk sectors are set. > Also, blk_revalidate_zone_cb() uses bit shift but this patch, nor the > previous one fix that. > The answer I gave to blkdev_nr_zones question for patch 1/6 applies here as well. The zone sizes used by blk_revalidate_zone_cb will be the emulated po2 zone size and not the actual device zone size which is npo2. So the math currently used in blk_revalidate_zone_cb is still applicable. -- Regards, Pankaj