Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp628013rwd; Thu, 8 Jun 2023 05:50:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AQ51lD16M1xH52Th4uKLI5JFq015mwr9OS00Sl7lCagQPCtGm5mgz4sy7RacFh1PTfZrC X-Received: by 2002:a05:6a00:14c9:b0:64a:f8c9:a421 with SMTP id w9-20020a056a0014c900b0064af8c9a421mr5057315pfu.32.1686228626511; Thu, 08 Jun 2023 05:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686228626; cv=none; d=google.com; s=arc-20160816; b=P2Qzk3OqnG8GY9ywg4dq0I3mjrfg80Z0qT/yZLn9R4/zePmtMr1W7cts7dxTjVSKqT jRpl6rKvf93C7ipjUTLqvVPP0Lslq9XJvqrOOJZSntSDELhpZgr/K75Co+jwNPBmbaCv ZeGa2K4sESH8WNKEdmAcEoidekyzmawd8XRaYmxr46lBrnwUYo0H9AJT03crw1QJd/c+ Wx2zr+XPyZ7rtv78KuXl1LHUXiRYv7f2x4qmVfxum7nQjgQ6sqnl3rjODcnka4A2a+lI 3ZBTW9kCyvzTIB7j2Uo99SKxX2lW7h+tp4wPIewQ5nYEunsuVtTEHn9hn/uqreFAuJxa cXlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=GZqw1aJu5pQAcbuNe5g1lBrt+2PDDEf+dePaVVQDS9s=; b=BXCGJd94Q8aKs/MP7TnxefJkT9DnqeoOqX9tYnTkY5swdXFUnarvIB7x9ORWpV9ugH 7yv0YaciJNV0snf//5f+qayX11OQhIMXlMWG7Jn9uFbZBPTkxeNz09Yzn/hW4rnn2DaL aw1htcqC8uijlP3T5TKajJBSV/5cgYury0ezgz6BxVctqt1uvOmgbWxrFoWxURtspE2t vJlDezbNq25+WCxJ/n11FKucIYMPyZvoxP3sE5YmJnVJmKx+zkv1+NaahDdR5W1EJDMs 8pyaaUmBGe7SnF3+gOE0YIf5pR53MtN4pI8jw6/5yaEkA/P0R4f0eZNYd6ntWohickkG InUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=DnotYXVE; 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 u186-20020a6385c3000000b00520dfb861fbsi961600pgd.416.2023.06.08.05.50.13; Thu, 08 Jun 2023 05:50:26 -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=DnotYXVE; 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 S236279AbjFHM20 (ORCPT + 99 others); Thu, 8 Jun 2023 08:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233942AbjFHM2Y (ORCPT ); Thu, 8 Jun 2023 08:28:24 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77559E43 for ; Thu, 8 Jun 2023 05:28:21 -0700 (PDT) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230608122818epoutp01cee327398f122359f953130046ab0df9~mrsskQFCI0325503255epoutp01D for ; Thu, 8 Jun 2023 12:28:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230608122818epoutp01cee327398f122359f953130046ab0df9~mrsskQFCI0325503255epoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1686227298; bh=GZqw1aJu5pQAcbuNe5g1lBrt+2PDDEf+dePaVVQDS9s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DnotYXVETkqZZ/mobOI3zyKjBqm0xzADIVGVepw2fcd8oGvzX+iDDqaLRY/Ga4t6U XfbvcIvZoORFW8gxvSRJSrDVmlZMYm8VA0H9g4P18zC4+ikX/LxyJ4P/KqF6idbSxY /qt3JbQwyLnotAod7a6mPdDZcQDcFZxmvzC9qJp4= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20230608122816epcas5p2b58dd7d8b7124a1c8760ab13fef80505~mrsrSQhHv0812208122epcas5p2X; Thu, 8 Jun 2023 12:28:16 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.181]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4QcNlz32Q5z4x9Pp; Thu, 8 Jun 2023 12:28:15 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 35.C7.16380.F59C1846; Thu, 8 Jun 2023 21:28:15 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230608121123epcas5p3071e22355035496648768f4cd420dee1~mrd7ftIoY0769507695epcas5p3f; Thu, 8 Jun 2023 12:11:23 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230608121123epsmtrp1727243a3d59cf2e910bb0ea7b28766b9~mrd7eajJr2145721457epsmtrp1h; Thu, 8 Jun 2023 12:11:23 +0000 (GMT) X-AuditID: b6c32a4b-56fff70000013ffc-51-6481c95f127e Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 8C.0C.28392.B65C1846; Thu, 8 Jun 2023 21:11:23 +0900 (KST) Received: from green245 (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230608121118epsmtip15e30d20fec6e750fa9049485a81dc2e6~mrd3Q0W5H2318023180epsmtip1C; Thu, 8 Jun 2023 12:11:18 +0000 (GMT) Date: Thu, 8 Jun 2023 17:38:17 +0530 From: Nitesh Shetty To: Christoph Hellwig , "Martin K. Petersen" Cc: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , martin.petersen@oracle.com, linux-scsi@vger.kernel.org, willy@infradead.org, hare@suse.de, djwong@kernel.org, bvanassche@acm.org, ming.lei@redhat.com, dlemoal@kernel.org, nitheshshetty@gmail.com, gost.dev@samsung.com, Kanchan Joshi , Javier =?utf-8?B?R29uesOhbGV6?= , Anuj Gupta , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v12 5/9] nvme: add copy offload support Message-ID: <20230608120817.jg4xb4jhg77mlksw@green245> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20171215 X-Brightmail-Tracker: H4sIAAAAAAAAA02Te0xTdxTH97ttb4uu7vJw+/GYkGqUR4p0lPqDWTGRyV2QDbe4zIFiQ68t jz7sQ3QaBZwwMAgCAqtuPCzvRSwoQ1SGZYqABLUgCipM6jZxoiKKjgFraV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mJFZWpRblxxeV5qQWH2KU5mBREue90HUyXkggPbEkNTs1 tSC1CCbLxMEp1cC0Z/knhkyZ9r8vrY6G/u3XyoiLVXFded7avvNzMZsSt92BTVm3f5S9+L/j 84YrLIuW+YTYt19/G+sq09h5L2TOh3Ymro695XcKY5ZUvlf61nN3tVR3flDMrFqLx+fLdspf sxVwOzCtZULjVaW8xqWrrDljfhw45sMZdFODhS9+09yva/5KbH6y/NK9a4qJmTyrDa8tYk+R nO5bpLDL5u0rA6eVblPXK54/tZA/i0H7/pH4T2V1gfqcUsK3WeNk5vdXMVqda4vuW/N5hsLE NRkvZziXxG3oLP7424zdPD90BmuCzsa8x7buqXH/s2+kXbU7Jme48sLZ8Nh6xW3PrY7HxWjs qXgtuM5Ty2Z7gocSS3FGoqEWc1FxIgCzmsAqlAMAAA== X-CMS-MailID: 20230608121123epcas5p3071e22355035496648768f4cd420dee1 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_57f1d_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230605122310epcas5p4aaebfc26fe5377613a36fe50423cf494 References: <20230605121732.28468-1-nj.shetty@samsung.com> <20230605121732.28468-6-nj.shetty@samsung.com> <20230606113535.rjbhe6eqlyqk4pqq@green245> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 ------RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_57f1d_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Disposition: inline Hi Christoph and Martin, On 23/06/07 12:12AM, Christoph Hellwig wrote: >On Tue, Jun 06, 2023 at 05:05:35PM +0530, Nitesh Shetty wrote: >> Downside will be duplicating checks which are present for read, write in >> block layer, device-mapper and zoned devices. >> But we can do this, shouldn't be an issue. > >Yes. Please never overload operations, this is just causing problems >everywhere, and that why I split the operations from the flag a few >years ago. > Sure, we will add REQ_COPY_IN/OUT and send a new version. >> The idea behind subsys is to prevent copy across different subsystem. >> For example, copy across nvme subsystem and the scsi subsystem. [1] >> At present, we don't support inter-namespace(copy across NVMe namespace), >> but after community feedback for previous series we left scope for it. > >Never leave scope for something that isn't actually added. That just >creates a giant maintainance nightmare. Cross-device copies are giant >nightmare in general, and in the case of NVMe completely unusable >as currently done in the working group. Messing up something that >is entirely reasonable (local copy) for something like that is a sure >way to never get this series in. Sure, we can do away with subsys and realign more on single namespace copy. We are planning to use token to store source info, such as src sector, len and namespace. Something like below, struct nvme_copy_token { struct nvme_ns *ns; // to make sure we are copying within same namespace /* store source info during *IN operation, will be used by *OUT operation */ sector_t src_sector; sector_t sectors; }; Do you have any better way to handle this in mind ? Thank you, Nitesh Shetty ------RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_57f1d_ Content-Type: text/plain; charset="utf-8" ------RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_57f1d_--