X-Patchwork-Id: 12973431
X-Patchwork-Delegate: snitzer@redhat.com
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 us-smtp-delivery-124.mimecast.com
(us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.lore.kernel.org (Postfix) with ESMTPS id 8591DECAAA1
for ; Mon, 12 Sep 2022 08:23:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1662970990;
h=from:from:sender:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:list-id:list-help:
list-unsubscribe:list-subscribe:list-post;
bh=G0tEm5KqGfFFyM24gd34jKscqyBsdy3vE8DaxyGU+pg=;
b=i9f4g+F4GhRWhUZm/+dyCvqbcE8gFGKgj4mY8eucdKEp4mTpZY5aeCskuWsyWoiBQKqc3f
t5UbJ5WZVwKYTni9fJsZy3bl44kjM0groHTdvf8P+Ph/nEbzQg9BlnYaZ0lQpHaICgF+/0
fhsKmnXFQZOY3nCiahxHj9QNuqLyDzs=
Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com
[66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
us-mta-605-AIOXyxyHOP-Fgyp2OMEsUg-1; Mon, 12 Sep 2022 04:23:07 -0400
X-MC-Unique: AIOXyxyHOP-Fgyp2OMEsUg-1
Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com
[10.11.54.8])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 708963C0E207;
Mon, 12 Sep 2022 08:23:05 +0000 (UTC)
Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com
(unknown [10.30.29.100])
by smtp.corp.redhat.com (Postfix) with ESMTP id 5D2A3C15BA4;
Mon, 12 Sep 2022 08:23:05 +0000 (UTC)
Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com
(localhost [IPv6:::1])
by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with
ESMTP id 274D71946A55;
Mon, 12 Sep 2022 08:23:03 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com
[10.11.54.5])
by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with
ESMTP id C77C91946A42
for ; Mon, 12 Sep 2022 08:23:02 +0000 (UTC)
Received: by smtp.corp.redhat.com (Postfix)
id B9B2E17582; Mon, 12 Sep 2022 08:23:02 +0000 (UTC)
Received: from mimecast-mx02.redhat.com
(mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22])
by smtp.corp.redhat.com (Postfix) with ESMTPS id B58FA10EB8
for ; Mon, 12 Sep 2022 08:23:02 +0000 (UTC)
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
[207.211.31.120])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 98F07185A7BA
for ; Mon, 12 Sep 2022 08:23:02 +0000 (UTC)
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
us-mta-171-TWZBy6xsPC6jXHBaSOL1qA-1; Mon, 12 Sep 2022 04:23:00 -0400
X-MC-Unique: TWZBy6xsPC6jXHBaSOL1qA-1
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id
20220912082229euoutp02b4f8834ee1637b162a46e11ef44de319~UD0SDAiC22459224592euoutp022
for ; Mon, 12 Sep 2022 08:22:29 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com
20220912082229euoutp02b4f8834ee1637b162a46e11ef44de319~UD0SDAiC22459224592euoutp022
Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20220912082221eucas1p2de725c04e5a886be72e457a910c1bf27~UD0KkmiuA2080020800eucas1p2I;
Mon, 12 Sep 2022 08:22:21 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges1new.samsung.com (EUCPMTA) with SMTP id C2.A8.29727.D3CEE136; Mon, 12
Sep 2022 09:22:21 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20220912082220eucas1p24605fdcf22aedc4c40d5303da8f17ad5~UD0J9MezM2081220812eucas1p2i;
Mon, 12 Sep 2022 08:22:20 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20220912082220eusmtrp2fc7aee3f5acceee3f20a1779396b031f~UD0J8SZqo3116631166eusmtrp2W;
Mon, 12 Sep 2022 08:22:20 +0000 (GMT)
X-AuditID: cbfec7f2-21dff7000001741f-21-631eec3db4dc
Received: from eusmtip1.samsung.com ( [203.254.199.221]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id 35.43.10862.C3CEE136; Mon, 12
Sep 2022 09:22:20 +0100 (BST)
Received: from localhost (unknown [106.210.248.191]) by eusmtip1.samsung.com
(KnoxPortal) with ESMTPA id
20220912082220eusmtip13a754fbe294b2d7e3ff4976e1d4fa77e~UD0Jj_EIH1380413804eusmtip1C;
Mon, 12 Sep 2022 08:22:20 +0000 (GMT)
From: Pankaj Raghav
To: hch@lst.de, agk@redhat.com, damien.lemoal@opensource.wdc.com,
axboe@kernel.dk, snitzer@kernel.org
Date: Mon, 12 Sep 2022 10:22:04 +0200
Message-Id: <20220912082204.51189-14-p.raghav@samsung.com>
In-Reply-To: <20220912082204.51189-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFnrEKsWRmVeSWpSXmKPExsWy7djP87q2b+SSDaY95bVYf+oYs8Xqu/1s
FtM+/GS2+H32PLNFa/s3Jou972azWtw8sJPJYs+iSUwWK1cfZbJ4sn4Ws8XfrntA2VvaFpd3
zWGzmL/sKbvFhLavzBafl7awW6y5+ZTF4sQtaQchj8tXvD12zrrL7nH5bKnHplWdbB6bl9R7
7L7ZwOaxs/U+q8f7fVfZPPq2rGL02Hy62uPzJjmP9gPdTAE8UVw2Kak5mWWpRfp2CVwZ/yYF
FtyprZi2u4GtgfFlchcjJ4eEgInE3RfbmLsYuTiEBFYwSux70s4O4XxhlJiy5xkThPOZUeLp
iX52mJbPX5tYIBLLGSX6ujaAJYQEXjJKvPwd0MXIwcEmoCXR2AkWFhFIl/g+/R3YIGaBicwS
j15uYASpEQZKbFgeBlLDIqAq8fh+JxOIzStgJbH+1DJmiF3yEjMvfQebwwkUf72qlRGiRlDi
5MwnLCA2M1BN89bZYC9ICKznlLjTuIEJotlFomftFihbWOLV8S1QD8hI/N85HypeLfH0xm+o
5hZGif6d69lAjpMQsJboO5MDYjILaEqs36UPUe4o0TDtJzNEBZ/EjbeCECfwSUzaNh0qzCvR
0SYEUa0ksfPnE6ilEhKXm+awQNgeEsvvzmGdwKg4C8kzs5A8Mwth7wJG5lWM4qmlxbnpqcWG
eanlesWJucWleel6yfm5mxiByfD0v+OfdjDOffVR7xAjEwfjIUYJDmYlEV4WQ+lkId6UxMqq
1KL8+KLSnNTiQ4zSHCxK4rzJmRsShQTSE0tSs1NTC1KL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VVqUX58UWlOanFhxhNge6eyCwlmpwPTB15JfGGZgamhiZmlgamlmbGSuK8ngUdiUIC
6YklqdmpqQWpRTB9TBycUg1MRkYignad2ieSd1oEzromyPT4ojOf4IG6zb/U1yecWfj7HXvq
V17TFE25Z3ZPbm7Yx715251GF/UN8oJ3Jp1NnfL36XzWhqAMa5+Eu68f2Ws2+8za1qEjk+yt
rmj/wv9+bo1hXE/fJfkXbHYri08xfy5wWfb+vPu6/4vqpT2nnyvXFHSy4/6sEBN7YNOT26/u
N0if3eDLkVw/d6nw51afEj5l11lzRCSO3mu5Iu7xUkLYobSSYYVkqQTH111r57qkmkWe+7T0
0Vrf7RNvyjxuuPu3ize27cjP+mrNO4L5K82jVlnfbNt4zOTLh63aGdNZ42f3FFl18kglNatb
vdl0b937dGGZmIvOS6YsW+6mxFKckWioxVxUnAgAANycVmUDAAA=
X-CMS-MailID: 20220912082220eucas1p24605fdcf22aedc4c40d5303da8f17ad5
X-Msg-Generator: CA
X-RootMTR: 20220912082220eucas1p24605fdcf22aedc4c40d5303da8f17ad5
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20220912082220eucas1p24605fdcf22aedc4c40d5303da8f17ad5
References: <20220912082204.51189-1-p.raghav@samsung.com>
X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection
Definition; Similar Internal Domain=false;
Similar Monitored External Domain=false; Custom External Domain=false;
Mimecast External Domain=false; Newly Observed Domain=false;
Internal User Name=false; Custom Display Name List=false;
Reply-to Address Mismatch=false; Targeted Threat Dictionary=false;
Mimecast Threat Dictionary=false; Custom Threat Dictionary=false
X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5
Subject: [dm-devel] [PATCH v13 13/13] dm: add power-of-2 target for zoned
devices with non power-of-2 zone sizes
X-BeenThere: dm-devel@redhat.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: device-mapper development
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Cc: Pankaj Raghav ,
Damien Le Moal , bvanassche@acm.org,
pankydev8@gmail.com, Johannes Thumshirn ,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
linux-block@vger.kernel.org, dm-devel@redhat.com, gost.dev@samsung.com,
jaegeuk@kernel.org, matias.bjorling@wdc.com
Errors-To: dm-devel-bounces@redhat.com
Sender: "dm-devel"
X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Only zoned devices with power-of-2(po2) number of sectors per zone(zone
size) 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 zone size target so that file systems can initially
work without any explicit changes.
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
value.
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