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 77EDEC04A68 for ; Thu, 28 Jul 2022 04:33:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230447AbiG1Ed1 (ORCPT ); Thu, 28 Jul 2022 00:33:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbiG1Ed0 (ORCPT ); Thu, 28 Jul 2022 00:33:26 -0400 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83E05723B for ; Wed, 27 Jul 2022 21:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1658982804; x=1690518804; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=qYi9CddhMTc16oCfTA5/fPBxT6fjV6ZJpvffXNGyyMo=; b=lli/wwzt61gSDsmSQusrCtJl3oTDXTEzT24LpTYRp/qmVbAxuVzHecE4 QP5skiUrZnaNeyhzvv21mUDZitreFM7RuKOzVGvn/RqlxpPt1cPZE5l+r i1rb9Kqzwvncfzzmb4ZqCyeh65XHfmvBiePr5Guh8rfJuQrp6lj6xv2IV XH3ozlD3Jzu2WJQAU32eFjA59laq5emoL+gh9E8pL7IufyOIN/Q1INtgk 2204Z5jOgd6K8RNcibJp8kucV0KCnUa7B6dGWQ8gtLEPPpMGs7tDz5VU6 MOyXVbERH2/QCY1muoisD75OmeAeD2ADeBAl9DXSaLlwTvMVX9jOh0EdW g==; X-IronPort-AV: E=Sophos;i="5.93,196,1654531200"; d="scan'208";a="311440701" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Jul 2022 12:33:22 +0800 IronPort-SDR: zp+zunsbU5CCCM7i/rOFYm/NLPeR7QO99cGmYxhLwWf7Zp8R2tWsgWlpnmZjLFm92dWe8e/2VY +Nh0vwDCjqUAO8qFMkDX66/2UxBZZRYybLkg6fnbRqbkeC/EcG00yIvVO6B0OT2MFIYZGHDYvf zO0HUryzAwYtsx0XVsCjUwHWx/hBBtqxNJe3kV2ZXtsw+XAFfQbDNEK8DPdkX4dZLI4UPZY914 eA7BbNWMFSvkPBS1cXAw8cJSnpCrk7L66j+EjlblPkmGmv0M8L3ooWSBqg79JeBjM1c5WFVoPG V4+86iEQ08IyT+E430HSbY0z Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Jul 2022 20:54:33 -0700 IronPort-SDR: mzSVhxGFdAvwSQZt/c1+37Z10eP6QJ75XEyr7Z1MvPJs3WzieTWgSSDU55iHWA6RnqUJoi+CYx enXFcy+RcHfdaMUp7uABHSo6A8znk4pv4FK8LFieDOrn1Yt3wPW1unvZEQx37/xfdoV548rPrr be7uVVf0GDNMrTs7X3OlgWeWZCSUD3ouDFAlSsHt/lELTZFDFWqmnR3aA15+wbvfY32zSk/xwj KomnCl/vUBVidu+V55Bn6OR/grWg9rDL2Lp3mY9nnXLSnCuP24dJ5j0harKhEatDtd0Ewe9Edr WBA= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Jul 2022 21:33:22 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Ltd7P3jvLz1Rws9 for ; Wed, 27 Jul 2022 21:33:21 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1658982797; x=1661574798; bh=qYi9CddhMTc16oCfTA5/fPBxT6fjV6ZJpvf fXNGyyMo=; b=ZLy6tv/5oGA/xQuL+JX5C/WZ34tyjtCsaj4kwX5723bke1wNeTJ ObnvOIjpLfPl6W51lrPkOljv6IX0O1PpIDMuHIhKhXOGMGRJFFYlHB00IJA0us9K M/GaoN8Sy0Y65fSmJwM4rAYjMXLbwdhEjVrVNdxih+H5WA7jyzzZaS1DjnMT6qE6 nCw8gR76sAt5l3jDqzHJfYQ+Jpy393YGqGf9cIAA8UcPJT68UOU1gJEvZL/U7aDr L0ybFXy7+eqgqzNNiPG19NBwSJRSdOPrj+sAziX5r3bJ9NvxHA8gYzny5jGXG6Us VeZr1sbr1kEy71rBR1Xj47EVdZKncRvDgqg== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ijUypCNvxv1t for ; Wed, 27 Jul 2022 21:33:17 -0700 (PDT) Received: from [10.225.163.14] (unknown [10.225.163.14]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Ltd7G0cPXz1RtVk; Wed, 27 Jul 2022 21:33:13 -0700 (PDT) Message-ID: <8fc11ae3-ddc4-4509-5374-04722a740bde@opensource.wdc.com> Date: Thu, 28 Jul 2022 13:33:12 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v8 11/11] dm: add power-of-2 zoned target for non-power-of-2 zoned devices Content-Language: en-US To: Pankaj Raghav , hch@lst.de, axboe@kernel.dk, snitzer@kernel.org, Johannes.Thumshirn@wdc.com Cc: matias.bjorling@wdc.com, gost.dev@samsung.com, linux-kernel@vger.kernel.org, hare@suse.de, linux-block@vger.kernel.org, pankydev8@gmail.com, bvanassche@acm.org, jaegeuk@kernel.org, dm-devel@redhat.com, linux-nvme@lists.infradead.org, Damien Le Moal References: <20220727162245.209794-1-p.raghav@samsung.com> <20220727162245.209794-12-p.raghav@samsung.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20220727162245.209794-12-p.raghav@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/28/22 01:22, 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. Please rephrase this spelling out "zone size" in the text. As mentioned before, "power-of-2(po2) zoned devices" is very unclear to people not familiar with zoned block devices. > > 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 a po2 target 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 > underlying device's zone size and the nearest po2 device zone size. > Device's actual zone size becomes the zone capacity of the target and > device's nearest po2 zone size becomes the target's zone size. 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 numner of sectors. > > For e.g., a device with a zone size/capacity of 3M will have an equivalent > target layout as follows: > > Device layout :- > zone capacity = 3M > zone size = 3M > > |--------------|-------------| > 0 3M 6M > > Target layout :- > zone capacity=3M > zone size = 4M > > |--------------|---|--------------|---| > 0 3M 4M 7M 8M > > All IOs will be remapped from target to the actual device location. That is what DM does... Instead of this obvious statement, explain how the remapping is done. > > 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. > > The target can be easily created as follows: > dmsetup create