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 232B7C00140 for ; Wed, 10 Aug 2022 17:32:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233522AbiHJRb7 (ORCPT ); Wed, 10 Aug 2022 13:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbiHJRb5 (ORCPT ); Wed, 10 Aug 2022 13:31:57 -0400 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B6EF82754 for ; Wed, 10 Aug 2022 10:31:56 -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=1660152716; x=1691688716; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=iSAbLAT1un1DIXlYyiyoixmMeyJZWbkOE9eh4lzWMkk=; b=PrJeeekJqz9pEQP0bMXa5DBhHMQ2b5fKfIQ2ug59zGwmBLdPNrJLTKvE X3xDdlsEnmDbAUGLI+cxBRgP2QfOJrzsSGOfqjTIGDBd2Y8wB/BjFwRTq hS04qZvBK/m5Oxp7MPPzDYFlwhJLOl6hmUBVdpk4Oz+1fmJaMnnOUItsd GKbtN0lF+g6f89q/3/WFnFS2xPhS0EDuLvZhQtDofIk1UlaIrGp11uICK WQvfLokHIjvCFKz4ih7p3Tq9k+V9D56WXesn7PmuASTrJjMcoRDVnOCe/ S9BB55dcraxuFeYfBhfUZhmjo7RDcjybmLuUXsbeW7ROCeZwPLkrnoao/ Q==; X-IronPort-AV: E=Sophos;i="5.93,227,1654531200"; d="scan'208";a="208365885" 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: pvW6CuuK3non/DTVtL2MvC/lK1Yxg2QMzD1TRL5a7SqXO1QE9qEAxrjHxyG1R+mwNGMgjMNqzV CHP0Cyr/hEufrXJkm+RlhKTL4lhBWr0rLFY9MgcgIXfbrctMMRsRc0S5RwDm+5VZDWxYDq40LB uUvRIDdOQXz7ZcfoWKHQtIK7nv8RDWvQm7E8H4cjVq86VF/pIYFjkudEbQPe+vehVKwAgTMGQq gKDlzxblYYsQd97x9gq8TAkc1bvctBPAZDHfhLYPf7h/wRGSgQHvdS3YQuj/2Hh+VtrWjer4Uz crpI30HKcX77O6sHLEp5VkEE 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: J55gqinuiDT8d+5oa1l9oKM/T8jNDwUuYk+iiePlTOGe69mZN7ivy58SiumnKEDDjk+Ynhy+0f wTP3LKQZrvZYLjj4GhNygSGHBh0c07zzOnOgAanIdAJ/vADoUc6mp+GYC8GYraYsECaGjqDHBh xLjc2+sqsl9kakR+/xCQjJXAC3rlkEfHOdw8pYGUh6eDbYPN2KZw+qbPDeR/clCRBULBkJc75d A2SYxsvJtOics4995zz6tKev+f+1pvNfKvhz4M14f5V5kz1WbttJd3D46gx9Wzq35BoYahSwjY SEk= 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:55 -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 4M2xnk0yZyz1Rws7 for ; Wed, 10 Aug 2022 10:31:54 -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 3u9HrS2KGyJw 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-block@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