Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5549644pxb; Mon, 14 Feb 2022 01:35:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUNcYOJPKoUbnohHEJuuTYQ/6sYWrbm/XQPlDdsceBOtDZyKsHl5Ge+v/bV35OT3wkm3ol X-Received: by 2002:a17:907:8a10:: with SMTP id sc16mr10341609ejc.344.1644831331089; Mon, 14 Feb 2022 01:35:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644831331; cv=none; d=google.com; s=arc-20160816; b=tlLdO8LfQ1YxWH6+0/WTKb2/33mJqcsGu690TaSg0Z4hLcLI48XtRUXd1HCyjSzIvw EIV0M4V7DUv1TdsDJQKAEiLUO0VayXXxb4rD73x3bOMD03ZLo3hi43QHztawgEa58fms nBlGeHkCafg6ZrgW552OdMoPDUh147wcpJMnLfHxdQ9rBJxDNeV6fjbi2ytt8BYEV3Zm 1v7UKs91JpyfcBzrGFGAb0t9tIQIvmIXSrB8rX6dNWqgjdrzErocrwiZqWF7SwAQqJIp f25SrYWDEKITMpniJ/0Dlpyeda+sugwcRQzERicAg0jLwrhwcClbL4LgcE+P8Hz0xub/ DYBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:dlp-filter:cms-type :content-transfer-encoding:mime-version:message-id:date:subject:cc :from:dkim-signature:dkim-filter; bh=vZTrgiOW+QssDF+eNNkQ/NKShN3mOUrphbtmnHAZuqM=; b=rriAFK1y+SDP03s6uT+cSgGLK9QDlbsFeXpXfx5m0FHoC0yosr9CDORGx1lKGLYbyb 2grTDpZmG3Eg9BdJrQMQZtuwgQY9ahZ2yw4BehSZiJr1iLRGsQKjWVjdSF95Zd1XY+5E RcqeQRyeQfdg/ZnEkY09XzbZG35pDHvcRn7GkzSsLZezRvH1/MyfRUcMMRviBxIvCYcV ODb1BRxlIUsbvNMSzeivHqtTN0A85dB5YiBem4WNnhCKwn2+4GNGXieWcWY4H4kOtlu7 hS7tbge932WRVe8/pGROxRN/vtvll2ibJrkYexoyjD/ufGW30YVD/YM7PuKGgnsZF7KZ q3UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@samsung.com header.s=mail20170921 header.b=gxj96gjS; 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=fail (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 13si19079606ejk.970.2022.02.14.01.35.08; Mon, 14 Feb 2022 01:35:31 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=gxj96gjS; 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=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242069AbiBNIfD (ORCPT + 99 others); Mon, 14 Feb 2022 03:35:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237052AbiBNIfB (ORCPT ); Mon, 14 Feb 2022 03:35:01 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0D9B25C73; Mon, 14 Feb 2022 00:34:51 -0800 (PST) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20220214083446epoutp0388b33d8e6892ec8968523c7a595b84a6~TmhDp91Xk0636606366epoutp03P; Mon, 14 Feb 2022 08:34:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20220214083446epoutp0388b33d8e6892ec8968523c7a595b84a6~TmhDp91Xk0636606366epoutp03P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1644827686; bh=vZTrgiOW+QssDF+eNNkQ/NKShN3mOUrphbtmnHAZuqM=; h=From:To:Cc:Subject:Date:References:From; b=gxj96gjSd5agoUpSAP33yMFQNMCy0QwkPtkt3yi1RYIM0eTbWyvVd0CqNuzEL4fBn u9xcozJqWNugbYweZ9EBT9wQEZ3sX2pxIbC0bDvvXyywVBSA5kPycPmKz1EPVx06Ec RrKA3NuGPpayCU/IrpJX/sWUMHQi1+gbBqzlvImM= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20220214083445epcas5p26fa92a4f5144c6e20ec809149f325a3f~TmhDQfoV-1890418904epcas5p2n; Mon, 14 Feb 2022 08:34:45 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.176]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4JxyFX1yMqz4x9Q3; Mon, 14 Feb 2022 08:34:40 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 57.F5.05590.E141A026; Mon, 14 Feb 2022 17:34:38 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220214080551epcas5p201d4d85e9d66077f97585bb3c64517c0~TmH0DlolQ0641206412epcas5p2k; Mon, 14 Feb 2022 08:05:51 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220214080551epsmtrp1e7b9ac42b2a39510a8cb2b24652a1017~TmH0B0nE20045600456epsmtrp1G; Mon, 14 Feb 2022 08:05:51 +0000 (GMT) X-AuditID: b6c32a4b-739ff700000015d6-5b-620a141e7676 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 9D.84.08738.F5D0A026; Mon, 14 Feb 2022 17:05:51 +0900 (KST) Received: from test-zns.sa.corp.samsungelectronics.net (unknown [107.110.206.5]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220214080546epsmtip2b0944a037ec35c960299faf315798fe6~TmHvuft_Q2320123201epsmtip2K; Mon, 14 Feb 2022 08:05:46 +0000 (GMT) From: Nitesh Shetty Cc: javier@javigon.com, chaitanyak@nvidia.com, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, dm-devel@redhat.com, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, axboe@kernel.dk, msnitzer@redhat.com, bvanassche@acm.org, martin.petersen@oracle.com, hare@suse.de, kbusch@kernel.org, hch@lst.de, Frederick.Knight@netapp.com, osandov@fb.com, lsf-pc@lists.linux-foundation.org, djwong@kernel.org, josef@toxicpanda.com, clm@fb.com, dsterba@suse.com, tytso@mit.edu, jack@suse.com, joshi.k@samsung.com, arnav.dawn@samsung.com, nitheshshetty@gmail.com, Nitesh Shetty , Alasdair Kergon , Mike Snitzer , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro , linux-kernel@vger.kernel.org Subject: [PATCH v3 00/10] Add Copy offload support Date: Mon, 14 Feb 2022 13:29:50 +0530 Message-Id: <20220214080002.18381-1-nj.shetty@samsung.com> X-Mailer: git-send-email 2.30.0-rc0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02TeUxUVxTGc99782YgBZ+IeCVR6dg2AYMybF6NtBYIfdFKaUhaNFU6MK8z CAzTWajSpAIj1gGUpa2FgSgoSwVFREV2CgSHYZFNpMhWdIhr2SlQtjI8aP3vOye/757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bBrP6kQEgzoRx5CK5dLPfVG7ZNJ8/sBBQb83T19SLBg6 USJDKeKkfpMnT8YW8PuEPYKgE/T/tQQTlVBK6NeNv/yor0jaYkbrD68b/CNns/oTlEI8yqzs jnqAYqJPJVw4MvrBQvpb9o+3gdvSt2bWrzaUUWkVRa0H+OTLq0q2Jqkd23u/Lsr6LjW5pcb6 5M7kcQ0y2lFwKjR8MEXXqptRvX/Tp1fuuOFsvNZXnpSmuqKLOQyno909Pc2ZtccKt3vl5dOf nVw2dL9qNPRTWgK/gVA+90wNBi8+r1gh3+KLC6vUHkluYqFqZ0MqeT1xPFzTonwH74nLMa1t /sbrLMpNvz2xNdeVN7Ap9ihd4XnzwysWGyVfdcier5WPTKSc+XFL8uwh1RuK9r/5H+J37rA0 HSe6pnSPkno7ziz8paAMu/nsDFJv4F8B1ZQ2/48DAAA= X-CMS-MailID: 20220214080551epcas5p201d4d85e9d66077f97585bb3c64517c0 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220214080551epcas5p201d4d85e9d66077f97585bb3c64517c0 References: X-Spam-Status: No, score=-4.5 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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch series covers the points discussed in November 2021 virtual call [LSF/MM/BFP TOPIC] Storage: Copy Offload[0]. We have covered the Initial agreed requirements in this patchset. Patchset borrows Mikulas's token based approach for 2 bdev implementation. Overall series supports – 1. Driver - NVMe Copy command (single NS), including support in nvme-target (for block and file backend) 2. Block layer - Block-generic copy (REQ_COPY flag), with interface accommodating two block-devs, and multi-source/destination interface - Emulation, when offload is natively absent - dm-linear support (for cases not requiring split) 3. User-interface - new ioctl 4. In-kernel user - dm-kcopyd [0] https://lore.kernel.org/linux-nvme/CA+1E3rJ7BZ7LjQXXTdX+-0Edz=zT14mmPGMiVCzUgB33C60tbQ@mail.gmail.com/ Changes in v3: - fixed possible race condition reported by Damien Le Moal - new sysfs controls as suggested by Damien Le Moal - fixed possible memory leak reported by Dan Carpenter, lkp - minor fixes Arnav Dawn (1): nvmet: add copy command support for bdev and file ns Nitesh Shetty (6): block: Introduce queue limits for copy-offload support block: Add copy offload support infrastructure block: Introduce a new ioctl for copy block: add emulation for copy dm: Add support for copy offload. dm: Enable copy offload for dm-linear target SelvaKumar S (3): block: make bio_map_kern() non static nvme: add copy offload support dm kcopyd: use copy offload support block/blk-lib.c | 346 ++++++++++++++++++++++++++++++ block/blk-map.c | 2 +- block/blk-settings.c | 59 +++++ block/blk-sysfs.c | 138 ++++++++++++ block/blk.h | 2 + block/ioctl.c | 32 +++ drivers/md/dm-kcopyd.c | 55 ++++- drivers/md/dm-linear.c | 1 + drivers/md/dm-table.c | 45 ++++ drivers/md/dm.c | 6 + drivers/nvme/host/core.c | 119 +++++++++- drivers/nvme/host/fc.c | 4 + drivers/nvme/host/nvme.h | 7 + drivers/nvme/host/pci.c | 9 + drivers/nvme/host/rdma.c | 6 + drivers/nvme/host/tcp.c | 8 + drivers/nvme/host/trace.c | 19 ++ drivers/nvme/target/admin-cmd.c | 8 +- drivers/nvme/target/io-cmd-bdev.c | 65 ++++++ drivers/nvme/target/io-cmd-file.c | 48 +++++ include/linux/blk_types.h | 21 ++ include/linux/blkdev.h | 17 ++ include/linux/device-mapper.h | 5 + include/linux/nvme.h | 43 +++- include/uapi/linux/fs.h | 23 ++ 25 files changed, 1074 insertions(+), 14 deletions(-) base-commit: 23a3fe5e6bb58304e662c604b86bc1264453e888 -- 2.30.0-rc0