Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1906584iog; Thu, 16 Jun 2022 17:04:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tufa1WqjevwyK4e6zDJRzBIeArJglzgtLnAgzY+Zr707InPFRnhVGtCyu/mE0yglagZ/qt X-Received: by 2002:a05:6a00:1805:b0:51c:3a7:54dc with SMTP id y5-20020a056a00180500b0051c03a754dcmr7119383pfa.15.1655424291052; Thu, 16 Jun 2022 17:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655424291; cv=none; d=google.com; s=arc-20160816; b=lPVQXwN9xucqpafrhvYaKacNfnl0hDQ56s3rXxvOUgFKXxXB2oAsQCAY0rzlKWKwmD r1vcw0mlXXw50R7EEDI2wJQ3+/fzRGoPbFpbsRo2LOpxU1hvPVFuYN9ZywvuUZO9LNjn evp9kx2fsF7uUGkpYmjNdTv8UcOPMBNd0D0m6Xhz0o9j9pnu/5Hf8KtEidvi6b1vlvXm kES1pGjFHTa76+vdSjZzVpZ4+RTQCwGbO+nFvn1E7WiT9i6hh5nX8VsKIamnmyrmozzV ginI7o8pkb482iDEZx5IRknc3rHIozUhIc38IRhn41Bkbb+4oU7V9F6XHhEhkcgcdEDb 9U4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=hdM3oSKidIe3vF8uAtMjC8Nhj602h1yqrDiw51IYg/g=; b=xeFKLVikNzIap5VijhxlnaCK07rKr8h4v6tC0WFAtdun2TAxj1tmigeXdVEs5XaFqH 4+D8QBMZ/WwBZw+HFQtqXEUJLv6xEpt9fRNeXHxQs7bLd9cyVEuPwUldfcxPvUFJFKlk Q0lXtibJYsmRC/OMwA/Qror2ylI7YivGiCltwQF6/qNK3vYd0NgEvm8deVswomAivaIR v8g2nhXMD6eFotRxaRIwEAKQCXe+UKuWa6S7sVyDW1EB1XCL1SbY5Wd15J4EG9ukkION bC3Vf82qdn8FJIDz9C2Hx/afUoRbytx7AmmxdJwQ6nJb99I8LdjHOr+fm8f/PxoRE2jM PV9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=KUN5eBen; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=MY2781I8; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a63-20020a639042000000b003f5d223885bsi4051830pge.591.2022.06.16.17.04.35; Thu, 16 Jun 2022 17:04:51 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=KUN5eBen; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=MY2781I8; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379443AbiFPXt2 (ORCPT + 99 others); Thu, 16 Jun 2022 19:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379203AbiFPXtW (ORCPT ); Thu, 16 Jun 2022 19:49:22 -0400 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAE7062BE9 for ; Thu, 16 Jun 2022 16:49:19 -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=1655423359; x=1686959359; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ZMytOujssEcOtiMdUCJ4EFf5UjhPhqNXGPuMIYgyGew=; b=KUN5eBenh7Np6pJPJ7r6tRxm8wGCJoZRkQPgfHyNCcHVrIe1mxtfQti8 JF75soyH8njSVzszHDehrBKM7+u/0c5Tt3F1vjs351Rq/bTq9SGtCaa6G C2anZLv38fUJDJxG3E7ASAstyExVbDuqWr04Yqwd4luIvyVEcjUVKgmK9 AHmbnpg7LNkX8369NV4thGDYuhwT8sDOdZgbmczd9HSAvoOoLrIFISnMQ F9JabEZ8GSf6BmQBMahHrQkOk/+9oWNbtZ2EzMbzznO66xLKFuQp/lHIY 2VesSq5kF+QwyZzInpDA/UID6gOZaeFPHCDc0DiLJ9+4rNIWlcGv+GhsD A==; X-IronPort-AV: E=Sophos;i="5.92,306,1650902400"; d="scan'208";a="202083453" 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; 17 Jun 2022 07:49:18 +0800 IronPort-SDR: MMroMTHK39pYwwqj51GFaXKuoCqXr+7CDn4kpO4wKJ5Yk7UqbeJeMmFW9sZfdCEO5p4UcJDFEy 1jaj2EDnPQyMR8qre2ncfV5maQUUQdXNlz7uw5toDWBPwPF0d/Yzcvs/hhcFu2JPJppFfGXyiO leNQ8xd03qZ7iGPvm4Xru+ze/Piyu0Fd6BeIjhX2n1Lc0bMZ1GwnfA+J3yqMiTjcjC0dW+CMn9 WLgwQlo9Ttrk6eHWXA2LlaApp8p1PQdQMgwu3NHYkS+AeZg47d/+n/2L6tNm3m0xKx5w+mzTOK 4Qk9aP3bpz752xwEl6m62hDA 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; 16 Jun 2022 16:11:54 -0700 IronPort-SDR: +irRrFARZMt4b5JCHqk2pjopS6ftGF7IUZz8kjPCCygBAUcZGdU8uzHuvtgDAR98N8uMsyXzTy Di6362DsagBM7G9dEy47/GbCyyaB/DjShtiTncrPds0kyKkfetW18kbdKLsumWESW5//ej2AVB zdXXrOkyHftAktRtbXvb0DZCYE/aPt2KuxT1cxwaXPCvTZgUypfQRMYu7oLZF8Sy2HyFl49kpO OPih9vjfUwgMLu7mByybRyKbG4fUR/KpWylboRNZQ5wPp/4OaIVCdxaotAxlew42i8Koa/yQOv Z/8= 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; 16 Jun 2022 16:49:19 -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 4LPJmZ38mqz1SVp7 for ; Thu, 16 Jun 2022 16:49:18 -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= 1655423355; x=1658015356; bh=ZMytOujssEcOtiMdUCJ4EFf5UjhPhqNXGPu MIYgyGew=; b=MY2781I8P6QIuOKbf4C3D9c+m5zqpH7HokQLlBMboN4Ua0KoU42 pCuCGXhZf8PFV5ug93eb1GQgeKi92dJVfhGyCSkwYKnFRNKwXHoWOi3r7wu4yaGi 7fZ+3omss2hUB2EerxihsAEAZM4copG9FcGA9SCGv/qqzNB5rzqjXmjT41kUuBQ6 JJYpEReR7bfcuCTwuMjsuyP5CXO5l59uWXwgQhkBNBH2/wBxrMZQ3/+3iE41bRSc yXnDpeRSXe0Xq6YyDC27aDZr5V0WvgnHpQWTz/8n47zSJ7IyT6BJ6rPkYeWUDcys kFHOpeJw0QdXutgSEx1baEmTl1TpposmbjQ== 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 BVwiY3MQVJ2x for ; Thu, 16 Jun 2022 16:49:15 -0700 (PDT) Received: from [10.225.163.84] (unknown [10.225.163.84]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4LPJmQ3YPgz1Rvlc; Thu, 16 Jun 2022 16:49:10 -0700 (PDT) Message-ID: <0c4f30f2-c206-0201-31e3-fbb9edbdf666@opensource.wdc.com> Date: Fri, 17 Jun 2022 08:49:09 +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> <63b0cfb6-eb24-f058-e502-2637039c5a98@opensource.wdc.com> <0b819562-8b16-37b6-9220-28bf1960bccb@samsung.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <0b819562-8b16-37b6-9220-28bf1960bccb@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 6/17/22 01:12, Pankaj Raghav wrote: > Hi Damien, > On 2022-06-15 13:49, Damien Le Moal wrote: >> 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 ? >> > This is what is being done: when we submit, we adjust the sector value > from target to device, and the actual sector value from bio gets updated > in the endio function where we transform from device -> target for zone > appends. I know all that. This was a remark intended at pointing out that this commit message statement does not have any value, it does not help in understanding any peculiarity of this target driver (if any). It seems targeted at zone append only. Reword this to explain the remapping for all IOs, and that zone management request and report zones also need remapping. >>> >>> 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 ? >> > Yeah. I will fix it. >>> dmsetup create