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 46B0BC3F6B0 for ; Wed, 10 Aug 2022 17:32:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233536AbiHJRb7 (ORCPT ); Wed, 10 Aug 2022 13:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbiHJRb4 (ORCPT ); Wed, 10 Aug 2022 13:31:56 -0400 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03FA08274E for ; Wed, 10 Aug 2022 10:31:55 -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=1660152714; x=1691688714; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=iSAbLAT1un1DIXlYyiyoixmMeyJZWbkOE9eh4lzWMkk=; b=nZhQ/DUCMHiOQ3xqdGrwsrcKqdrJ1zTGGoNNbwmRkJWWWTAoPOCyb66R HqBVCpprV+ynuw1f0wwezl4JE+H0vU8WZvcE9CfPqDroS87hXYMpkKSnm eFIpzByAq0dgXKtiXtfcGdMLHrr8CB2tJ3BnFhmwqhgeKD9WKn5BzS0kR xt99wu26PJ/wm59kMxbdJFRjLg7Bubu3hNA6DHj4xLRvESjCztMrxFk8O ZsKvySe9DwLZbuOaQNSL2fLRUIPyAPPtUngi9TF8FFRX4mCXLOhV508oc gXo7WvXBFyae2ahprVcTHxiFoDfKZX9yI4T5Yilteyt9NjouvtJXj8od3 g==; X-IronPort-AV: E=Sophos;i="5.93,227,1654531200"; d="scan'208";a="208365884" 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; 11 Aug 2022 01:31:54 +0800 IronPort-SDR: xm9UDKbMGTr9MX4a1+pn7OjpW2sATjtK8Ac+10GoA4UoPEk00AsKu3SW0ulxHNpbIlb2BJCvti +zGX6qJCg1WHtmwjQbe5C3nv38DwnqO2ON4L9t6FeHcdbr9s9YvsfrgQJNW/SuisJm8/xy2qBc HAGg5CxxFXqb0lhhR+GCip1a/SN6gv/zK5XI+6GQnkUSjFTIQ1F1dQz+Ly8HXvroneNqYj0sro kMATq9/1kRqS75ETadJPEbatEh4bDq9aFY3qPWvxWmz2/bRb1pynJET8EqPipC9Pv/sYeUgfho AwLPPEqtbdA6epkyyoYZ9E5/ 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; 10 Aug 2022 09:52:49 -0700 IronPort-SDR: MxOfY5KiS9osqz4Q793yjc6ecSIblZBvl+lJubmRoPzGyopeUPuF27Tykw8I5GDRqMmy97DgT+ d2HC8rOAnIyX+PX+EsGqAo5a/+O1cR2FIOmLUmRi2nHUneaaN07Mkz7BuSENMiEDUtEMxjMHAj fpE1mdPtdeBneO1EVjY+5txTAKYqFJFyN0iCDhTSohgkx9KZ54d0k647FAEPdYGOYb9Hp8uYHV fSPKx/gVxTVelOqAhd7zmJelXeS8QvpFOW8TroMjQqjjjqDutegqRbIU3auCC/xW6HYZOLnrLV noU= 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; 10 Aug 2022 10:31:54 -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 4M2xnk0SWKz1Rws4 for ; Wed, 10 Aug 2022 10:31:53 -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= 1660152710; x=1662744711; bh=iSAbLAT1un1DIXlYyiyoixmMeyJZWbkOE9e h4lzWMkk=; b=NkFepG72oh0Ro6o6I1Sk/28LgFGx9euMASY8zzem+IsK4ScCKzV n7uVJb9v+3OmoN4p21hZka1q4b/xPox7RRLagW5ypFjC6szScO1dKubrEZMMs4/g kNZtWAD7W3WJEyPDSh+d9ANuV3dZhqdEhjqfkc+Qd8+BU5R17MsUZF3vQjRx0RvO PfN5Xc/WYcPJybvgU5u4B1wMY452OisDsf49PVqeBpBUgRDBvS75Sw81ezUY6VrB bI8PmXqBpfQZOA76Ipomg1LOwBgiZroD7aoMIXUUcpqaF9mtc1B/wyadB69MPxYU /4N5u5lmG17oNnVwdD5QwBRPhTF1Gmrn55g== 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 So-N3Lnyf7zo for ; Wed, 10 Aug 2022 10:31:50 -0700 (PDT) Received: from [10.111.68.99] (c02drav6md6t.sdcorp.global.sandisk.com [10.111.68.99]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4M2xnc6NWnz1RtVk; Wed, 10 Aug 2022 10:31:48 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2022 10:31:48 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v9 13/13] dm: add power-of-2 target for zoned devices with non power-of-2 zone sizes Content-Language: en-US To: Pankaj Raghav , Johannes.Thumshirn@wdc.com, snitzer@kernel.org, axboe@kernel.dk, agk@redhat.com, hch@lst.de Cc: dm-devel@redhat.com, matias.bjorling@wdc.com, gost.dev@samsung.com, linux-kernel@vger.kernel.org, pankydev8@gmail.com, jaegeuk@kernel.org, hare@suse.de, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, bvanassche@acm.org, Damien Le Moal References: <20220803094801.177490-1-p.raghav@samsung.com> <20220803094801.177490-14-p.raghav@samsung.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20220803094801.177490-14-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 2022/08/03 2:48, 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. > > 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. > > 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. > > 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 > > 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