Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp589977rwb; Thu, 11 Aug 2022 06:54:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR5yh60voabtmkmNsXafPox0z+RdhS+X304ul0WyCYyvAr3VHAUw5I4/88jpG8RfrR8PIoOL X-Received: by 2002:a05:6402:268d:b0:43d:b9d0:9efc with SMTP id w13-20020a056402268d00b0043db9d09efcmr31523506edd.92.1660226073952; Thu, 11 Aug 2022 06:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660226073; cv=none; d=google.com; s=arc-20160816; b=S8ixli85GU1A6y07bV1urer8b7gs0sfmPT8Clt2jAv5YmeqG5xF3twzRfNzV+LQXcp Ff1qIdB12OVQbCpRMbBkaeHrREHIDRvnwJcuBrbDdzzqZ/hyeAAqnqsQ0vRdy/UhHGtE cEEE30ISAK/7aINdEszLF9Kb2xyfqhAJxV+zi+oLl24Zo+G/z0XOjlHYIGEXXXyFCS6V pFuYbDgT3tBtfc2STUkQId2g92nucynK/jl742PWnyoJ5wHt5/e6CN/ywLKwNKTsecyP LALVOnMrBIuDCySUnjSK+R0AH1Doe3inlo4Ef/C646GPBNxq+kSKNO+CaTKRSFm9MiHn mDOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=Vun+gxn/6GGUdv/MRPXNdrbElNQFCuft36lThciOU28=; b=vn+YpmHXduXFmJAAJxObuUMwNNa8EfSMuAX4r59PVwdCiamjrlLVYnTEBwbyyj4XPR LSZYeocS0okTeVuzDtrBqlgxp17Sc/2ESl6H+5PP5no4BZ90ol5pPylzyB80EEEGd+pQ rnZJDvwZaYgD1JI7D/baWlraoJY1XsvJ9w2UUQ1M0nTRVtnyZ63Mlh3CKcawy/Uoslpc SJ2pM45DWuTJ9ZksMFmBk8eERq6NHqfpa7XzsuWhOYWvXbqrw8WsdV9eCKS40TnEPMco s+vg+i+zdDAlA3fxkojEyZipVhYeNyeD2x6kspC/Jx0OJzI3pF6rVb+3zO7IJEvbWfAG LGhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=O4xsWJm4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a056402400100b0043d88c55277si12838753eda.238.2022.08.11.06.54.08; Thu, 11 Aug 2022 06:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=O4xsWJm4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234574AbiHKNR6 (ORCPT + 99 others); Thu, 11 Aug 2022 09:17:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234050AbiHKNRz (ORCPT ); Thu, 11 Aug 2022 09:17:55 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C24B7B7B9 for ; Thu, 11 Aug 2022 06:17:54 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220811131750euoutp02aa00fcc46760da7cc88a8b75213a2a29~KTNBlMF-d0070600706euoutp02X for ; Thu, 11 Aug 2022 13:17:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220811131750euoutp02aa00fcc46760da7cc88a8b75213a2a29~KTNBlMF-d0070600706euoutp02X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1660223870; bh=Vun+gxn/6GGUdv/MRPXNdrbElNQFCuft36lThciOU28=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=O4xsWJm4cyq/4Yh0kN11fAjkgj2cpSM80dFLSBVBOmoH2STNgkj2OPqTg8iAx4FJF l9dpnOldbBRSZjldGISht50wjzAusMdLbEjOcqpp+FfoKGNU0sexa4LuKrinANrVWT JOQhMSV5f/BFc6lCfZceV3BjdlgZebPN6h0hqHcc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220811131750eucas1p198d4a2f1cdb759f30a96e801edc14992~KTNBNGQux1197711977eucas1p1s; Thu, 11 Aug 2022 13:17:50 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 2E.91.10067.E7105F26; Thu, 11 Aug 2022 14:17:50 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220811131749eucas1p2456bbf8f8a2538b9ecf9f5be0092b643~KTNA0jRaH1732617326eucas1p2I; Thu, 11 Aug 2022 13:17:49 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220811131749eusmtrp1716c41bc4995b31c4e4725050f35189a~KTNAzmNiZ0860708607eusmtrp14; Thu, 11 Aug 2022 13:17:49 +0000 (GMT) X-AuditID: cbfec7f4-dd7ff70000002753-ba-62f5017e867f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E4.A4.09038.D7105F26; Thu, 11 Aug 2022 14:17:49 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220811131749eusmtip1985b7f25892c387e44680c1d52d0068c~KTNAppwLl1773117731eusmtip1y; Thu, 11 Aug 2022 13:17:49 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.43) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Aug 2022 14:17:47 +0100 Message-ID: Date: Thu, 11 Aug 2022 15:17:46 +0200 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 v9 13/13] dm: add power-of-2 target for zoned devices with non power-of-2 zone sizes Content-Language: en-US To: Damien Le Moal , , , , , CC: , , , , , , , , , , Damien Le Moal From: Pankaj Raghav In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.43] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCKsWRmVeSWpSXmKPExsWy7djPc7p1jF+TDG5MYbdYf+oYs8Xqu/1s FtM+/GS2+H32PLNFa/s3Jou972azWuxZNInJYuXqo0wWT9bPYrb423UPKHFL2+LyrjlsFvOX PWW3mND2ldlizc2nLBYnbkk7CHhcvuLtsXPWXXaPy2dLPTat6mTz2Lyk3mP3zQY2j52t91k9 3u+7ChQ6Xe3xeZOcR/uBbqYA7igum5TUnMyy1CJ9uwSujCcb57EWvBKsOHBEtoFxH08XIy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CMS-MailID: 20220811131749eucas1p2456bbf8f8a2538b9ecf9f5be0092b643 X-Msg-Generator: CA X-RootMTR: 20220803094816eucas1p1890ceb4faebaf4f0cdbc9581d1308672 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220803094816eucas1p1890ceb4faebaf4f0cdbc9581d1308672 References: <20220803094801.177490-1-p.raghav@samsung.com> <20220803094801.177490-14-p.raghav@samsung.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> +========== >> +dm-po2zone >> +========== >> +The dm-po2zone device mapper target exposes a zoned block device with a >> +non-power-of-2(npo2) zone number of sectors as a power-of-2(po2) zone number > > s/zone number of sectors/number of sectors per zone (zone size) > >> +of sectors. >> +The filesystems that support zoned block devices such as F2FS and BTRFS >> +assume po2 zone size sectors as the kernel has traditionally only supported >> +those devices. However, as the kernel now supports zoned block devices with >> +npo2 zone size sectors, the dm-po2zone target can be used by the filesystems >> +before adding native support. > > filesystems will not "use" the target. The user has to set up the target first > and the filesystem will run on top of it. Detail, but rewording this make it > clear that this is not an automatic thing magically happening. > > Not that your patch series is lacking f2fs and btrfs patches to check for the > power of 2 zone size of the zoned device. Unless these checks are already in place ? > btrfs already had these checks in place and f2fs patch to allow only po2 zone size was already merged by Jaegeuk. 7f262f737502 ("f2fs: ensure only power of 2 zone sizes are allowed") >> + >> +Partial mapping of the underlying device is not supported by this target. >> + >> +Algorithm >> +========= >> +The device mapper target maps the underlying device's zone size to the >> +zone capacity and changes the zone size to the nearest po2 number of sectors. >> +The gap between the zone capacity and the zone size is emulated in the target. >> +E.g., a zoned block device with a zone size (and capacity) of 3M will have an >> +equivalent target layout with mapping as follows: >> + >> +:: >> + >> + 0M 3M 4M 6M 8M >> + | | | | | >> + +x------------+--+x---------+--+x------- Target >> + |x | |x | |x >> + x x x >> + x x x >> + x x x >> + x x x >> + |x |x |x >> + +x------------+x------------+x---------- Device >> + | | | >> + 0M 3M 6M >> +