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 0B825C433EF for ; Wed, 15 Jun 2022 11:50:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344313AbiFOLt7 (ORCPT ); Wed, 15 Jun 2022 07:49:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237723AbiFOLt5 (ORCPT ); Wed, 15 Jun 2022 07:49:57 -0400 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD2C48896 for ; Wed, 15 Jun 2022 04:49: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=1655293795; x=1686829795; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=UwzFKMs4KQMIAKOxw5zetV+fYeDr1pp0OLi0nfGg/a8=; b=EB5ghRNs4HOvDetaRL3s1nAX15DVasKnjoukOL4w9w64ap64lk6Xhoz4 uHIfKRk3ZXaHvVedF65njzhGN3BdbfCVGNQS5FKnxy9Tz1w5mFJ8FJZhm SHkAkrNfxC+lyV3ifiz52u+6hdqO5ga0xioxPrSQId78MKzcSMTCPvIJS yHbTECZ6DHR+iqtRR4JsMrPHjvMGXP3n+QsCFxeoeO3Lx5P0xGTcHL5kX TaO3pT41EuZQtN0DhiUk2PPerCFKNp/Cd0aOzMVDUJvPaSjc1fW20gjc3 vYOw1ukCPlEnc5Jr2O6PVkEyrykJ1gYIzf249S7lYPkfCgMxKIXrsUe5l A==; X-IronPort-AV: E=Sophos;i="5.91,302,1647273600"; d="scan'208";a="307513496" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jun 2022 19:49:55 +0800 IronPort-SDR: oU704fFjAS2NhgGaSpRBYiNMH2zHTPTFQEjxh2SqQqa6F4DX4Egbx8Hk+jl+03qiVb5AcQKdQY fBdpXY2MlJUW+ntwwyAR91Xt2U8XGpUSIwl0gazP0yrxeC+Yr4p97SuKf6d1IdSauz5obuh4Pk dd7jVoQGMvS0nBH7CwIoAsKb6wHPVm0+1wWsA3VVW/QQH3IafQwO++EghqwqE8Fnpzh40cEu3M tWBHvkQEezWhxcf7vFGcXa7bdPwr8Z7G5z/9MKU6Gtm9jPk/mo35h8YE5ykdgQSFUrkgIqw7Y1 lFUVqmoUq0mnIRc+jWgRaTJV Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 15 Jun 2022 04:08:19 -0700 IronPort-SDR: PzWwnExJcSSXcAddyv36IvDuQEjcX0z87w/SSZqd3i0wiecVTUNiUvH/JdDBWNYfe3VVymcrEA PS2AynPnjjImZlynXYnqxTeohaXElPC41mqQJ3Z7CLLYA/OWlzL6uy0tzQW/LQFFDeG/EKMvtz 2ERYKVMmkqtrCsRZw9Rn9NwYmOgH5nxEXz2OxL/PRtbKlg9zLIvckGcWh0noEJr2MdZQlyoqwV nWU0O2VvLDEBvTAI8W4vkDF2bQshc+2UZTkkdDP1pqg3rIhgSWLNfsL4J73eKVQlJnUOAXj8IK sMc= 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; 15 Jun 2022 04:49:56 -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 4LNNry481Wz1SVp7 for ; Wed, 15 Jun 2022 04:49: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= 1655293791; x=1657885792; bh=UwzFKMs4KQMIAKOxw5zetV+fYeDr1pp0OLi 0nfGg/a8=; b=NO3QPupa7jJ1MG+sn6/lem2fyr7XeEiyf62kjM4M/hLNlm9JBEV YCsZDbi+aolKsl4jmZnixgw2+aA/Qj1IqEG86wu25S0OWgwvwJBA1N3PO2ntt1eJ FbTLe3mChfsYcZunpiATw/6M/ImA59BppW3embHv7atdc8zNjMJWW5aiHJ7GRrcC ldcFxxTke9JV2oxJTBcPpIF2NpSfrgmFdSNMFqeXy9eH8Z2+ODppSoV0YiDw+ZeZ EpKHvKLtE8m7A/rdMgg/V8EEfkT0RM0dQXdiK8nUcYMFxWcTLy0yc0oPH/nEQhq9 hMEAkhV2RszmLnDw6HtLVAuxaqBmkyBzZ1w== 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 Q2eaVc0o9dyU for ; Wed, 15 Jun 2022 04:49:51 -0700 (PDT) Received: from [10.225.163.82] (unknown [10.225.163.82]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4LNNrr1LdFz1Rvlc; Wed, 15 Jun 2022 04:49:47 -0700 (PDT) Message-ID: <63b0cfb6-eb24-f058-e502-2637039c5a98@opensource.wdc.com> Date: Wed, 15 Jun 2022 20:49:46 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v7 13/13] dm: add non power of 2 zoned target Content-Language: en-US To: Pankaj Raghav , hch@lst.de, snitzer@redhat.com, axboe@kernel.dk Cc: bvanassche@acm.org, linux-kernel@vger.kernel.org, jiangbo.365@bytedance.com, hare@suse.de, pankydev8@gmail.com, dm-devel@redhat.com, jonathan.derrick@linux.dev, gost.dev@samsung.com, dsterba@suse.com, jaegeuk@kernel.org, linux-nvme@lists.infradead.org, Johannes.Thumshirn@wdc.com, linux-block@vger.kernel.org, Damien Le Moal References: <20220615101920.329421-1-p.raghav@samsung.com> <20220615101920.329421-14-p.raghav@samsung.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20220615101920.329421-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 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 ? > > 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 ? > dmsetup create