Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1874040rwe; Fri, 2 Sep 2022 05:21:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR7f8zAt8bz5bjGSpvvfwyo22yDWel6Q05m1Ll0lSJ2CFTa7tuuIYwnd5U2A7ZjvhIE22mDZ X-Received: by 2002:a17:902:e750:b0:174:f3a4:9338 with SMTP id p16-20020a170902e75000b00174f3a49338mr20377819plf.135.1662121314144; Fri, 02 Sep 2022 05:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662121314; cv=none; d=google.com; s=arc-20160816; b=wFakwZoz+z4nBJaRrHy6T9ecQtL0+1aU9PYkQIxcMwUmzLJJIds81QFchVUFlmryMP 0xPbtt2bQgaLP3p3VRnZQ40Q21M5JAHWDB90ntMeQVxKLgBdR+hbYY2opsmMekcS6/FW CReYBNsmctB6eMiPxYvdh1vq6cIHUaS7xJnBDlGYPj4F7cp2L+9iP84cDj98R5cCYY1I A9nOk79UtAyaFN4gZJkmnCEpa2hvTEMiWtsmFJZJrQIut3Ea8sJ8LyxDfm5kIaI2vURj kACtbqCpL5dNFVBY9zeGHRkm0Xu4mzLrIROCsXFg23nXqTg376mQp8yVj27uMSPBRb7I vKXg== 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=ksjAwLWGNl6eTSiZxyGsY95CwqFsiCy8PT3NAtpouPk=; b=IgPBssSiKom6oNU1IFqsR6OHc2PNLDyyBd34sx2Qc4Xjh1pecfg27CpBrSHanUJdEE u656gedj7dlUKelrkMqBR5JvtB/a/3mXdJ4zmCqh/lQ+LM4N9YtDrYbT1PC5aFiv14CP RJGhprIicsprYc4heiidSKvUwlGhUIeiH0IzV+tveh+fy+jRJKy1QHZLZum4VrSdLt80 U1RlXvt4LhHCxbeODZChu3YuTKtjQhXZLNrMZ49iQAkLKNAXkhBfq7+luG29SYzcYOG4 GPLys9pkSoQdoD0tZiT41miJmG/Wk9F1I/XK1Gyt5zY7hedaxcjWCk0UuN50ti2KGVvU /VIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZdAULa+s; 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 x13-20020a170902ec8d00b0017278771a40si2116223plg.186.2022.09.02.05.21.39; Fri, 02 Sep 2022 05:21:54 -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=ZdAULa+s; 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 S235815AbiIBMFS (ORCPT + 99 others); Fri, 2 Sep 2022 08:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235392AbiIBMFP (ORCPT ); Fri, 2 Sep 2022 08:05:15 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E4B92ED6D for ; Fri, 2 Sep 2022 05:05:06 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220902120504euoutp02ecebfcf0cfc59c24e8893ebf7fb07514~RCZxv67Wo0225102251euoutp02s for ; Fri, 2 Sep 2022 12:05:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220902120504euoutp02ecebfcf0cfc59c24e8893ebf7fb07514~RCZxv67Wo0225102251euoutp02s DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1662120305; bh=ksjAwLWGNl6eTSiZxyGsY95CwqFsiCy8PT3NAtpouPk=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=ZdAULa+sVWkVAlKdMrAZldam0SB8LFmNKXQ7rPuMQQ2oMsEwWZD+KoixVKpPO17Uz qsHJc76ANkAMrCQ55CsUbey/jigu3/7RDvm8GZmlDTHgfiLv75u1SfyGRkZ5YdbE6Y HyR+ggnpkFMw9W0+r5o0ojEZN3QVH3IJwPhNjT5k= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220902120504eucas1p124b40b28956f8aa1e5c36afa91283ea9~RCZxURROJ2730127301eucas1p1W; Fri, 2 Sep 2022 12:05:04 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id C4.5E.19378.071F1136; Fri, 2 Sep 2022 13:05:04 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220902120503eucas1p15a51efdda30e44ecc7b93e5e990e3249~RCZwyYJ0h0807808078eucas1p1i; Fri, 2 Sep 2022 12:05:03 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220902120503eusmtrp2b35aa3ab5c6b82570eaeb872404b2f55~RCZwxZ7ae0472204722eusmtrp2T; Fri, 2 Sep 2022 12:05:03 +0000 (GMT) X-AuditID: cbfec7f5-a35ff70000014bb2-7e-6311f170f347 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 91.94.07473.F61F1136; Fri, 2 Sep 2022 13:05:03 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220902120503eusmtip1ee0971ca79428ee096867b3b155cb72a~RCZwnOMVF0453604536eusmtip1-; Fri, 2 Sep 2022 12:05:03 +0000 (GMT) Received: from [192.168.8.130] (106.210.248.27) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 2 Sep 2022 13:05:02 +0100 Message-ID: <6906b295-f043-2f6c-8860-216b07ab86df@samsung.com> Date: Fri, 2 Sep 2022 14:05:00 +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 v12 13/13] dm: add power-of-2 target for zoned devices with non power-of-2 zone sizes Content-Language: en-US To: , , , , CC: , , , , , , , , , , , Damien Le Moal From: Pankaj Raghav In-Reply-To: <20220823121859.163903-14-p.raghav@samsung.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.27] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMKsWRmVeSWpSXmKPExsWy7djP87oFHwWTDR60SlqsP3WM2WL13X42 i2kffjJb/D57ntmitf0bk8Xed7NZLfYsmsRksXL1USaLJ+tnMVv87boHlLilbXF51xw2i/nL nrJbTGj7ymyx5uZTFosTt6QdBDwuX/H22DnrLrvH5bOlHptWdbJ5bF5S77H7ZgObx87W+6we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U4X+1U2b+XcYwTl9yzfOEqUb7jcv/lLiWW 4oxEQy3mouJEAH4bd6euAwAA X-CMS-MailID: 20220902120503eucas1p15a51efdda30e44ecc7b93e5e990e3249 X-Msg-Generator: CA X-RootMTR: 20220823121915eucas1p10296d6a2ab00de5e73791a7d6b8e39de X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220823121915eucas1p10296d6a2ab00de5e73791a7d6b8e39de References: <20220823121859.163903-1-p.raghav@samsung.com> <20220823121859.163903-14-p.raghav@samsung.com> X-Spam-Status: No, score=-7.1 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 On 2022-08-23 14:18, Pankaj Raghav wrote: > +static int dm_po2z_iterate_devices(struct dm_target *ti, > + iterate_devices_callout_fn fn, void *data) > +{ > + struct dm_po2z_target *dmh = ti->private; > + sector_t len = dmh->nr_zones * dmh->zone_size; > + > + return fn(ti, dmh->dev, 0, len, data); > +} > + > +static struct target_type dm_po2z_target = { > + .name = "po2zone", > + .version = { 1, 0, 0 }, > + .features = DM_TARGET_ZONED_HM | DM_TARGET_EMULATED_ZONES, This target also supports DM_TARGET_NOWAIT feature flag. I will add it in the next version. > + .map = dm_po2z_map, > + .end_io = dm_po2z_end_io, > + .report_zones = dm_po2z_report_zones, > + .iterate_devices = dm_po2z_iterate_devices, > + .module = THIS_MODULE, > + .io_hints = dm_po2z_io_hints, > + .ctr = dm_po2z_ctr, > +}; > + > +static int __init dm_po2z_init(void) > +{ > + return dm_register_target(&dm_po2z_target); > +} > + > +static void __exit dm_po2z_exit(void) > +{ > + dm_unregister_target(&dm_po2z_target); > +} > + > +/* Module hooks */ > +module_init(dm_po2z_init); > +module_exit(dm_po2z_exit); > + > +MODULE_DESCRIPTION(DM_NAME "power-of-2 zoned target"); > +MODULE_AUTHOR("Pankaj Raghav "); > +MODULE_LICENSE("GPL"); > +