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 5B287C43334 for ; Thu, 16 Jun 2022 16:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378058AbiFPQMW (ORCPT ); Thu, 16 Jun 2022 12:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377141AbiFPQMU (ORCPT ); Thu, 16 Jun 2022 12:12:20 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE8664476A for ; Thu, 16 Jun 2022 09:12:16 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220616161211euoutp028704f425ae0bc193bf599970d9436792~5JdRWMwck2682526825euoutp02T for ; Thu, 16 Jun 2022 16:12:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220616161211euoutp028704f425ae0bc193bf599970d9436792~5JdRWMwck2682526825euoutp02T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1655395931; bh=YpSTGfJTj5ESqCEZoVxybV24L+dMaMmjttqOvj9zqkM=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=nwU6/kgPheuRXgKxFbR6fcXquqEAYycpbnQBjPslIXAezuhCjVpIoidHYwCi0V0jx cgFpbx4SHiOI3b+qhbQ29TAeBYi5BKXdzKI61CvB/i9236DhHo69ZGRZsxwIbhEYkp fYIDmfMQ7IghWs5NVxUU8fP9k3Kz3PvVWXqQobh4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220616161211eucas1p295ba6d89667f807ae527a12483909950~5JdRAPlNH0245502455eucas1p2v; Thu, 16 Jun 2022 16:12:11 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F0.8F.09580.B565BA26; Thu, 16 Jun 2022 17:12:11 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220616161210eucas1p115d523e8dc5355e1179e2b267cf9800d~5JdQTfYih1246312463eucas1p1Z; Thu, 16 Jun 2022 16:12:10 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220616161210eusmtrp2ef0db1527aba0e69896207e120906c94~5JdQShJpJ2110121101eusmtrp27; Thu, 16 Jun 2022 16:12:10 +0000 (GMT) X-AuditID: cbfec7f5-9adff7000000256c-e6-62ab565bd508 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 21.2E.09095.A565BA26; Thu, 16 Jun 2022 17:12:10 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220616161210eusmtip1cbfd7c21dec8ce375bc53c0501d87964~5JdQEJVXq1192611926eusmtip1F; Thu, 16 Jun 2022 16:12:10 +0000 (GMT) Received: from [192.168.1.12] (106.210.248.244) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 16 Jun 2022 17:12:03 +0100 Message-ID: <0b819562-8b16-37b6-9220-28bf1960bccb@samsung.com> Date: Thu, 16 Jun 2022 18:12:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v7 13/13] dm: add non power of 2 zoned target Content-Language: en-US To: Damien Le Moal , , , CC: , , , , , , , , , , , , , Damien Le Moal From: Pankaj Raghav In-Reply-To: <63b0cfb6-eb24-f058-e502-2637039c5a98@opensource.wdc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.244] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMKsWRmVeSWpSXmKPExsWy7djPc7rRYauTDLY/lbJYfbefzWLah5/M Fr/Pnme2aG3/xmSx991sVosLPxqZLPYsmsRksXL1USaLJ+tnMVv0HPjAYvG36x5QrOUhs8Xe W9oWl3fNYbOYv+wpu8Wam09ZLNo2fmV0EPS4fMXb49+JNWweO2fdZfe4fLbUY9OqTjaPhQ1T mT02L6n32H2zASjXep/V4/2+q2we67dcZfHYfLra4/MmOY/2A91MAXxRXDYpqTmZZalF+nYJ XBmXLi5kL7iVUnFup1oD42z/LkYODgkBE4kDM9m6GLk4hARWMEq0LFvPBOF8YZQ483wzI4Tz mVFi7+RfLDAdN3dXQ8SXM0q82fmOGa5obed9qPZdjBK3dr1hBOngFbCT2Lo+p4uRk4NFQFVi xdYHLCA2r4CgxMmZT8BsUYEIiZWtb8AWCAs4SjSdSAIJMwuIS9x6Mp8JJCwikCcx718SyHRm gRZmia79D5lB4mwCWhKNnewgJqeAm8S2KfEQnZoSrdt/s0PY8hLb385hhrheWeLfTmaQsIRA rcTaY2fYQSZKCDRxSdzongOVcJHYvaCJCcIWlnh1fAs7hC0j8X/nfKh4tcTTG7+ZIZpbGCX6 d65ng1hgLdF3JgeixlFiVcsTRogwn8SNt4IQ5/BJTNo2nXkCo+ospGCYheTfWUg+mIXkgwWM LKsYxVNLi3PTU4uN81LL9YoTc4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Zomu/Q+ZIVb9AVo79xE7SBGbgJZEYyeYySng JrFtSjzEGE2J1u2/2SFseYntb+cwQ3yoLPFvJzPEI7USr+7vZpzAKDoLyW2zkBwxC8mkWUgm LWBkWcUoklpanJueW2yoV5yYW1yal66XnJ+7iRGYZLYd+7l5B+O8Vx/1DjEycTAeYpTgYFYS 4TULXpkkxJuSWFmVWpQfX1Sak1p8iNEUGEATmaVEk/OBaS6vJN7QzMDU0MTM0sDU0sxYSZzX s6AjUUggPbEkNTs1tSC1CKaPiYNTqoEp36quXPHgOcnjBRMUv3HNlbC+ZXThlt2txy7q/lf8 npzLOn7v4F3/LObj678VOXVMvfc3K6pkalxiw9KSVIHvM+VTmifP66hNZj5j2HrvZ/+xJXx2 zor/9eO7OOyyTn6Rf9q1fEO9ja7IkmnNGsErfCy/SObvZHu8aLphxsvwa3vnSG9b7pJz4e6V HTOnZf5fuHQrR0xQ/aVjl+u02XIbWh1/Rp/RSPdslu98ITJj0Zm0WD0909N5apcfcj8N5hN/ fDblzRoNsf1KB3Z0rX4h1jnL83dt0IbFihpTLLUmnnds/R0kI1qVPj2zsSoi5pFcz9vGR9Os /pY8d3z6abPBEe51lme3/3i6OmHqpAWKSizFGYmGWsxFxYkAAGyT5bsDAAA= X-CMS-MailID: 20220616161210eucas1p115d523e8dc5355e1179e2b267cf9800d X-Msg-Generator: CA X-RootMTR: 20220615102011eucas1p220368db4a186181b1927dea50a79e5d4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220615102011eucas1p220368db4a186181b1927dea50a79e5d4 References: <20220615101920.329421-1-p.raghav@samsung.com> <20220615101920.329421-14-p.raghav@samsung.com> <63b0cfb6-eb24-f058-e502-2637039c5a98@opensource.wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Damien, On 2022-06-15 13:49, Damien Le Moal wrote: > On 6/15/22 19:19, Pankaj Raghav wrote: >> Only power of 2(po2) zoned devices were supported in linux but now non >> power of 2(npo2) zoned device support has been added to the block layer. >> >> Filesystems such as F2FS and btrfs have support for zoned devices with >> po2 zone size assumption. Before adding native support for npo2 zoned >> devices, it was suggested to create a dm target for npo2 zoned device to >> appear as po2 device so that file systems can initially work without any >> explicit changes by using this target. >> >> The design of this target is very simple: introduce gaps between the zone >> capacity and the po2 zone size of the underlying device. All IOs will be >> remapped from target to the actual device location. For devices that use >> zone append, the bi_sector is remapped from device to target's layout. > > Nothing special for zone append in this respect. All IOs are remapped > likewise, right ? > This is what is being done: when we submit, we adjust the sector value from target to device, and the actual sector value from bio gets updated in the endio function where we transform from device -> target for zone appends. >> >> The read IOs that fall in the "emulated" gap area will return 0 and all >> the other IOs in that area will result in an error. If an read IO span >> across the zone capacity boundary, then the IOs are split between the >> boundary. All other IO operations that span across a zone capacity >> boundary will result in an error. >> >> The target can be easily updated as follows: > > Updated ? you mean created, no ? > Yeah. I will fix it. >> dmsetup create