Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4391111ioa; Wed, 27 Apr 2022 02:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygxmjVsAUr4dlv8YYyaIdgRbS7TuSCF/FA4WX563ZkZmzonyB+bSN2bWGklzI/pMXrNLTj X-Received: by 2002:a63:a902:0:b0:398:cdd3:f85e with SMTP id u2-20020a63a902000000b00398cdd3f85emr23301482pge.122.1651052939310; Wed, 27 Apr 2022 02:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651052939; cv=none; d=google.com; s=arc-20160816; b=uR4rNEjBTLaaciSAur/NQmQ17M1548msmdH5SRGRHcJKIrtR8U7I5xXbZ96paZY4UW hrSVomW9JoIlrd9G4WaYfov+h2+hQAjwJm4o9r7Vl9i8dedKLiOlrb3cwAiSL00BIqu9 OpTNipTF/SDhmpmr7PZyn/rnvrqg+Zm9tbekPYgREl2VSjrWYEbo4i36vgfhbmQYaxw6 Q9axmTCjWdc1XO8Aa9I2DbH2+fg3KoTd/PZkZRStI4njuzCo4OTGGRtd0HelPzY3NPrY 1w3LOMVGdswDJjE45LGyprUS8S76zx7OjImbdqwg22lPY73wcqONB0OLUixWdWAFiOdI nKRg== 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=0O69LIhroj7wI37uoYLFc4k8EiKu/Hjr+CxXLXQiZDI=; b=EQS0bzRQcQ02Ax12H01PwduW9nzni+f/bc/yAMrzPk6wCHPWCLlscXYs/5rhL6cNrS dCsaLzgZNezvk2sH6InrYkLFUoDM8RjsMC2wKZkv9jMhNYxcSkvy4CZdYIN2DXoUWC4k 4D8FK4VxUOW5/vGtQn9eeX4LBzFwtBGx8uGsbDDj3n/Hfns3HK1n2RQKzucIA4MfnT5F EIXcmtK7ai7uoURi2ShfGe/mudikFZ89gNQOmxCMomCazZnpTQUG/fg4hb/asi89HxO7 eJajP+aRGP9XLy9Og3BnPDNO1PiwE9xXiimh9Yn4pSTLCUasmMrJ4NUwTBT+/zRpoDsQ iJmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@samsung.com header.s=mail20170921 header.b=fCZIlxoC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j14-20020a170902758e00b00158643c240asi1163248pll.87.2022.04.27.02.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:48:59 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@samsung.com header.s=mail20170921 header.b=fCZIlxoC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0D762366B3; Wed, 27 Apr 2022 02:21:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349824AbiDZMRv (ORCPT + 99 others); Tue, 26 Apr 2022 08:17:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238060AbiDZMRt (ORCPT ); Tue, 26 Apr 2022 08:17:49 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AECD3793A1; Tue, 26 Apr 2022 05:14:41 -0700 (PDT) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220426121439epoutp0401d40543c66c374dc583ec79daa1fc7c~pcUTtjBsm2403224032epoutp04h; Tue, 26 Apr 2022 12:14:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220426121439epoutp0401d40543c66c374dc583ec79daa1fc7c~pcUTtjBsm2403224032epoutp04h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1650975279; bh=0O69LIhroj7wI37uoYLFc4k8EiKu/Hjr+CxXLXQiZDI=; h=From:To:Cc:Subject:Date:References:From; b=fCZIlxoC8abjvZgiOGBavTj55jQpOhHYC8gCtXq0YsPcVG55P2lXs3l45QlfIJD8F EHhA3QgY0IGuc+VP+1AL5IJzRzIraI95AlEZnnsHTG+EmIlAL+MkPP/li7ggEGSfl2 qZW2QMYR02b8JeiNuG7LVd7939XbzvguWuzyQtBA= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20220426121438epcas5p10d323e4e6161275933c063e854a206a8~pcUTVHmsQ2178321783epcas5p1J; Tue, 26 Apr 2022 12:14:38 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.179]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4KngmV03q9z4x9Q0; Tue, 26 Apr 2022 12:14:34 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 75.F0.09762.922E7626; Tue, 26 Apr 2022 21:14:33 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20220426101804epcas5p4a0a325d3ce89e868e4924bbdeeba6d15~paug6xF5B1971219712epcas5p4f; Tue, 26 Apr 2022 10:18:04 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220426101804epsmtrp279588e73b7154a836e04af3ef14dd860~paug5evnb1306613066epsmtrp2l; Tue, 26 Apr 2022 10:18:04 +0000 (GMT) X-AuditID: b6c32a4b-213ff70000002622-67-6267e229546a Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id D0.39.08853.BD6C7626; Tue, 26 Apr 2022 19:18:03 +0900 (KST) Received: from test-zns.sa.corp.samsungelectronics.net (unknown [107.110.206.5]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220426101757epsmtip1dbba971682fc11ea2415d9083f2b846b~pauasWk1T0320603206epsmtip1X; Tue, 26 Apr 2022 10:17:57 +0000 (GMT) From: Nitesh Shetty Cc: 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, nitheshshetty@gmail.com, gost.dev@samsung.com, Nitesh Shetty , Alasdair Kergon , Mike Snitzer , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Alexander Viro , linux-kernel@vger.kernel.org Subject: [PATCH v4 00/10] Add Copy offload support Date: Tue, 26 Apr 2022 15:42:28 +0530 Message-Id: <20220426101241.30100-1-nj.shetty@samsung.com> X-Mailer: git-send-email 2.35.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z5vItemCNxdeCOeAEZKXzO 2siaEMexfBzuDXIhs5RncLXfz4QMzU+LcWn70/lFkXwCrvbUzXuGj8EPa14JxRI+Ef/tL0Sh GPPxuMgbsRBH4J7TE0wopvnXcV3Z/Jk0vxIbG87QP6IllheU5X9leUH9gugatFzQGbQarUGp U2YIhxUGldaQk6FRfJ6ptaH5H4ld24yaah4oOhDFoQ6EOVq+VHIi5gu1VLJf9fU3gj5znz4n XTB0oGiOkUdJhkw9+6S8RpUtHBIEnaD/r6W4RbJcqu6fI9sv7ESyR6vFK4ZzolfJK84nLZPO eI/0yZNHHXueFG4NWBFeG+uKcynbe49/Eqlbs8kvsj72SqJiGhKElJUkGPBELt71wbLws7LP tP6xt3vGfEuSzaZAuQYau7fsCC8g7Ezr0cLod3aXRmUy+TslB2s3Fq1wzOpSFe9nDx9Wr5cf u5l4t2T04LtbDFaV+v62uFpb6ebHI+vuBy69dXFvU/KGufwrQ3lma6+m4NCq76xJV9/b6qwY yMrao2jte1QaTNuV+5o75ePMvohreSnOLO1pW+Vum/rPsm0/v1R2yZ5AmTtT6wem4n3Fs5zL 0d21xp/WMNRZ5V5d8tH1JpIsZwwHVMpYWm9Q/QtVFxLzkgMAAA== X-CMS-MailID: 20220426101804epcas5p4a0a325d3ce89e868e4924bbdeeba6d15 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: 20220426101804epcas5p4a0a325d3ce89e868e4924bbdeeba6d15 References: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 - copy_file_range for zonefs 4. In-kernel user - dm-kcopyd - copy_file_range in zonefs For zonefs copy_file_range - Seems we cannot levearge fstest here. Limited testing is done at this point using a custom application for unit testing. Appreciate the inputs on plumbing and how to test this further? Perhaps some of it can be discussed during LSF/MM too. [0] https://lore.kernel.org/linux-nvme/CA+1E3rJ7BZ7LjQXXTdX+-0Edz=zT14mmPGMiVCzUgB33C60tbQ@mail.gmail.com/ Changes in v4: - added copy_file_range support for zonefs - added documentaion about new sysfs entries - incorporated review comments on v3 - minor fixes Arnav Dawn (2): nvmet: add copy command support for bdev and file ns fs: add support for copy file range in zonefs Nitesh Shetty (7): 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 nvme: add copy offload support dm: Add support for copy offload. dm: Enable copy offload for dm-linear target SelvaKumar S (1): dm kcopyd: use copy offload support Documentation/ABI/stable/sysfs-block | 83 +++++++ block/blk-lib.c | 358 +++++++++++++++++++++++++++ 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 | 116 ++++++++- drivers/nvme/host/fc.c | 4 + drivers/nvme/host/nvme.h | 7 + drivers/nvme/host/pci.c | 25 ++ drivers/nvme/host/rdma.c | 6 + drivers/nvme/host/tcp.c | 14 ++ 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 | 49 ++++ fs/zonefs/super.c | 178 ++++++++++++- fs/zonefs/zonefs.h | 1 + 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 ++ 28 files changed, 1367 insertions(+), 15 deletions(-) base-commit: e7d6987e09a328d4a949701db40ef63fbb970670 -- 2.35.1.500.gb896f729e2