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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 861FDC25B08 for ; Wed, 10 Aug 2022 12:24:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbiHJMYa (ORCPT ); Wed, 10 Aug 2022 08:24:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiHJMY1 (ORCPT ); Wed, 10 Aug 2022 08:24:27 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55AB37390A; Wed, 10 Aug 2022 05:24:25 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220810122422euoutp029218fe6af2cd3de66370842708bc77fc~J_1DMYGH_1252712527euoutp02c; Wed, 10 Aug 2022 12:24:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220810122422euoutp029218fe6af2cd3de66370842708bc77fc~J_1DMYGH_1252712527euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1660134262; bh=+3l88EsjGyn55z4ZRs7gGju8VKtfIG8BwbGIKXpK3bc=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=GNtF231Dlgnyvl2Ga/u8W64gnmoeF4aOvxQOZrCrtYj0fqjRg9zF529hKcpfTn+Ze TZnOjjwpsGrPwG0pGuDgpMYyk2Pq24FOIHiNLCeV+0KzITKaXuDkNI0+js0VURMkbQ 9IlEQPzjCUBGR6WJXTOi2cGopyDXjl/Q5bNb/NWI= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220810122421eucas1p18ddad99e5ed2c74a453eac86180fac40~J_1C_RwyV1021510215eucas1p1W; Wed, 10 Aug 2022 12:24:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 42.FC.09664.573A3F26; Wed, 10 Aug 2022 13:24:21 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220810122421eucas1p2cc6ec714dd3694c3a940f167f1bd4e0f~J_1CftUue2435624356eucas1p29; Wed, 10 Aug 2022 12:24:21 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220810122421eusmtrp27c56f3582085b5cf2384109b4abfee15~J_1CeqCHi2578525785eusmtrp2d; Wed, 10 Aug 2022 12:24:21 +0000 (GMT) X-AuditID: cbfec7f2-d97ff700000025c0-6f-62f3a375baf2 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C1.C5.09038.573A3F26; Wed, 10 Aug 2022 13:24:21 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220810122421eusmtip1cfb9e32e43046f89b85c123ee7ad73d3~J_1COj95f0260102601eusmtip1U; Wed, 10 Aug 2022 12:24:21 +0000 (GMT) Received: from localhost (106.210.248.55) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 10 Aug 2022 13:24:20 +0100 Date: Wed, 10 Aug 2022 14:24:18 +0200 From: Joel Granados To: Pankaj Raghav CC: , , , , , , , , , , , , , , , , Damien Le Moal Subject: Re: [PATCH v9 13/13] dm: add power-of-2 target for zoned devices with non power-of-2 zone sizes Message-ID: <20220810122418.uezvmhtpg4smhb3q@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="sgoahstkgh4p3pr6" Content-Disposition: inline In-Reply-To: <20220803094801.177490-14-p.raghav@samsung.com> X-Originating-IP: [106.210.248.55] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEJsWRmVeSWpSXmKPExsWy7djPc7qliz8nGTT16VqsP3WM2WL13X42 i2kffjJb/D57ntmitf0bk8Xed7NZLfYsmsRksXL1USaLJ+tnMVv87boHlLilbXF51xw2i/nL nrJbTGj7ymyx5uZTFosTt6QdBDwuX/H22DnrLrvH5bOlHptWdbJ5bF5S77H7ZgObx87W+6we 7/ddBQqdrvb4vEnOo/1AN1MAdxSXTUpqTmZZapG+XQJXxva5qxgL7rcxVnQ92sPUwHgyq4uR k0NCwETid9dNli5GLg4hgRWMEu1Tr0I5Xxglds3fwgThfGaU2PbgNxNMy/9l11ghEssZJT7+ WopQdXv/EihnC6PE99bX7CAtLAKqEv/e7mYEsdkEdCTOv7nDDGKLCGhIPLuyGayBWWA/s8SV t4uBEhwcwgJZEi+fyoDU8AqYS7z40MMCYQtKnJz5BMxmFqiQ+HuoiRGknFlAWmL5Pw6QMKeA jcTV3f2sEJcqSVx7/pQFwq6VWHvsDDvIKgmBf5wSS9edhEq4SCz7PxWqQVji1fEt7BC2jMT/ nfOhXs6W2DllFzOEXSAx6+RUNpC9EgLWEn1nciDCjhILT/eyQ4T5JG68FYS4kk9i0rbpzBBh XomONiGIajWJHU1bGScwKs9C8tcsJH/NQvgLIqwjsWD3JzYMYW2JZQtfM0PYthLr1r1nWcDI vopRPLW0ODc9tdgwL7Vcrzgxt7g0L10vOT93EyMwqZ7+d/zTDsa5rz7q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YJjMKzkAyahTBoFsIgkApmAS2JG/9eMmEIa0ssW/iaGcK2lVi37j3LAkb2VYwiqaXFuem5 xUZ6xYm5xaV56XrJ+bmbGIGJZduxn1t2MK589VHvECMTB+MhRhWgzkcbVl9glGLJy89LVRLh LVv0OUmINyWxsiq1KD++qDQntfgQoykwDCcyS4km5wNTXl5JvKGZgamhiZmlgamlmbGSOK9n QUeikEB6YklqdmpqQWoRTB8TB6dUA1OmgCyLBIdBtpG6z6JrB57L9LS/SvI5xerGHWdkbW2e 2CEqWbNo8pRrl2p6A9Wf+y16ck514s9wG78VL/ZOvLYo8l4wh84Nd716PhOX1X2vvi2rFeBJ kFie53sk8cISoe9V02Q6Ns28usu4RXlt4Lv05MyV7nofHhUs/rov6Urgqw1iMpoOTY75UUVp 63Vmam051vvB7sXChoeyE6/Oqha722d6fMolJbWQr/pvprdP57K6pP56RfdN/513493YZjB+ j9vT7fyKO4dNOzg8SKli4mXWzYcS5QOXBUq/Do3+NN95ba/5zJmPPV/9vyVtXpjAamv78nXE PYc5Kjqq/Y0nLrFcjj6hvDtrErvmUyWW4oxEQy3mouJEAHYcxDHBAwAA X-CMS-MailID: 20220810122421eucas1p2cc6ec714dd3694c3a940f167f1bd4e0f X-Msg-Generator: CA X-RootMTR: 20220803094816eucas1p1890ceb4faebaf4f0cdbc9581d1308672 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220803094816eucas1p1890ceb4faebaf4f0cdbc9581d1308672 References: <20220803094801.177490-1-p.raghav@samsung.com> <20220803094801.177490-14-p.raghav@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sgoahstkgh4p3pr6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 03, 2022 at 11:48:01AM +0200, Pankaj Raghav wrote: > Only zoned devices with power-of-2(po2) zone sizes were supported in linux > but now non power-of-2(npo2) zone sizes support has been added to the > block layer. Would it make sense to replace this first paragraph with: " Only zoned devices with power-of-2(po2) zone sizes (in number of sectors) were supported in linux but now non power-of-2(npo2) values are supported in the block layer. " ? In this way you have made clear that zone sizes are in number of sectors and every time you reference it afterwards, it is implied that it is in number of sectors. otherwise LGTM Reviewed-by: Joel Granados >=20 > Filesystems such as F2FS and btrfs have support for zoned devices with > po2 zone size assumption. Before adding native support for npo2 zone > sizes, it was suggested to create a dm target for npo2 zone size device to > appear as a po2 size zoned target so that file systems can initially work > without any explicit changes by using this target. >=20 > The design of this target is very simple: remap the device zone size to > the zone capacity and change the zone size to be the nearest power of 2 > number of sectors. >=20 > For e.g., a device with a zone size/capacity of 3M will have an equivalent > target layout as follows: >=20 > Device layout :- > zone capacity =3D 3M > zone size =3D 3M >=20 > |--------------|-------------| > 0 3M 6M >=20 > Target layout :- > zone capacity=3D3M > zone size =3D 4M >=20 > |--------------|---|--------------|---| > 0 3M 4M 7M 8M >=20 > The area between target's zone capacity and zone size will be emulated > in the target. > The read IOs that fall in the emulated gap area will return 0 filled > bio and all the other IOs in that area will result in an error. > If a read IO span across the emulated area boundary, then the IOs are > split across them. All other IO operations that span across the emulated > area boundary will result in an error. >=20 > The target can be easily created as follows: > dmsetup create