From patchwork Wed Apr 19 11:43:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nitesh Shetty X-Patchwork-Id: 85376 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp347568vqo; Wed, 19 Apr 2023 05:27:04 -0700 (PDT) X-Google-Smtp-Source: AKy350bCLO/IhoON5eIQVl3AtJeFPayVVTRQ8AxFBnnCLWyVm5EbOy1D5+R5A0Vqg34k1OQQBIP2 X-Received: by 2002:a17:90b:3b82:b0:249:8963:c72 with SMTP id pc2-20020a17090b3b8200b0024989630c72mr1691944pjb.17.1681907223952; Wed, 19 Apr 2023 05:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681907223; cv=none; d=google.com; s=arc-20160816; b=VfTBW+3Fj9GdS5FqYyk00rOvjCAL7aI5R3nIoKq1SMp1P/LtoOOotekCBGsqvb5NMJ PzqKfNaEkQinQOZod8uajqBam3Clv/7ChZJY3VtBbddCLTrcphklTyNFvNKkY3GhAo9a 5796BriN6wQMBOk99bgOmu7dUtp1zabXU8oJrzYcmEkEXkxsH0IfmhaHZc8Poc0tfQwU SPhRKv4b+BHLlDceB6zleBm2nTl9tOhZ5NlAlQ782b25G4iF7s9dPJKWCqXcA3QpbCbI UYoD/RPwL3Awyjs6RK5azbmQrcA/iNJzawwYrEUOPq9FrqHeRFev/yjxB43WSC4x9jbN +8sA== 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 :content-transfer-encoding:mime-version:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=cp2ikyfpBdIhGRYkH19yhVPh/sP+Xdj/kjqikt163DM=; b=h02HVPTwNwPp5yg8+H+zsl1nvCL5/elgG1bYKVTQjDV6RkKjeTThcf+1FV3vvn/vSS rgUafuH/3QEZ+KeYuhMe29YTYFTYyYHxFbxPqzt8019qAPy7YAlsd8blxWGjLfHIFtzc 3R6T0miKl+xPac5HIY4XhSa2w0ha/z9yz4KTlZW8VJO4VYee0BnQbT3vdZSqniJZbbiN V0x3LLOGVGUJan2CG5IHVrhaU7u1KILLhFVNgoqD5k0O5MXfPpWko1vkRNto3NHIXBEn gSQVA9x4arttYLOyZamgO3yo7HdwAIr839u2pZeKacr96DhZow7a1cfvVd7PC4m13FDj mLLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=EY6qvk7T; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ie2-20020a17090b400200b002472cd8ded6si278438pjb.103.2023.04.19.05.26.48; Wed, 19 Apr 2023 05:27:03 -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=EY6qvk7T; 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 S233068AbjDSLzn (ORCPT + 99 others); Wed, 19 Apr 2023 07:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbjDSLy7 (ORCPT ); Wed, 19 Apr 2023 07:54:59 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FF4615473 for ; Wed, 19 Apr 2023 04:54:55 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230419115454epoutp02220744db4f61bfbddb05cc97a3f652c6~XU-Q-UoKp2907729077epoutp02H for ; Wed, 19 Apr 2023 11:54:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230419115454epoutp02220744db4f61bfbddb05cc97a3f652c6~XU-Q-UoKp2907729077epoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1681905294; bh=cp2ikyfpBdIhGRYkH19yhVPh/sP+Xdj/kjqikt163DM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EY6qvk7TzRqRxwm7hJ015z3ImKC0JmnhvBHdL44aKGa8rS4A5QByhu2/HTJvl3ES8 i2tcTEZFAgmYjvT/+itmWPq3gVPGfnlzF4e2uyHUSFsfxjUYTheMIrE0GiXzjMCc71 HSg5qlWXlLV3Jjva96JNaHjNMJc59UFFJiK3Jtvk= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230419115453epcas5p38f000f783a08296ce1442ed383ed5af3~XU-QVDK4C2577325773epcas5p3M; Wed, 19 Apr 2023 11:54:53 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.176]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Q1fNW5y7Qz4x9Pr; Wed, 19 Apr 2023 11:54:51 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id E4.9D.09540.B86DF346; Wed, 19 Apr 2023 20:54:51 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20230419114801epcas5p2eb7e9c375817d827d5175468de34f0cb~XU5QHChIv1524715247epcas5p2l; Wed, 19 Apr 2023 11:48:01 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230419114801epsmtrp1476d5be0b44a2a0755f0370122e2d9eb~XU5QFxr0I1843518435epsmtrp1j; Wed, 19 Apr 2023 11:48:01 +0000 (GMT) X-AuditID: b6c32a4a-70dfa70000002544-a1-643fd68b68b7 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 4A.93.08609.0F4DF346; Wed, 19 Apr 2023 20:48:00 +0900 (KST) Received: from green245.sa.corp.samsungelectronics.net (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230419114757epsmtip146c11a6792a756842f64d0b81903c6bf~XU5Mf0aLU2050920509epsmtip1S; Wed, 19 Apr 2023 11:47:57 +0000 (GMT) From: Nitesh Shetty To: Jens Axboe , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro , Christian Brauner Cc: bvanassche@acm.org, hare@suse.de, ming.lei@redhat.com, dlemoal@kernel.org, anuj20.g@samsung.com, joshi.k@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, Nitesh Shetty , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v10 8/9] dm: Enable copy offload for dm-linear target Date: Wed, 19 Apr 2023 17:13:13 +0530 Message-Id: <20230419114320.13674-9-nj.shetty@samsung.com> X-Mailer: git-send-email 2.35.1.500.gb896f729e2 In-Reply-To: <20230419114320.13674-1-nj.shetty@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01Te0xTZxTfd297W0iKl8Lm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M57n2WK49PxomT2IsvKWcU/ilHOHhlY59abr5fm08/GhCD7xMlrj3sq0iUhQT4zB7PFEcqX 3sVF0vsCVlXu+8Z2Wuu0bfyA3SPotibetP78noLfWw5MVgmx4bljP7WD52vaR+CZL43Lbmxq IPQ+U+hle1ozdbU4/9SP9IAk16Z9tMRWuWT4udx3OTl0gccXp81N+Ftj9IV6uTRHgLoNOxYK Jq3am3pL/+eH97idA7cY21JvvnOBb7TF3a33+LRK3TGyOXQxHIwJetbx/LfebvULjj0S5akv OdFSK4mdtNmHItUpluj9L1KjSiWHjqmqIs05dd2HYABuGlQjN1nl8W+/JGUue6z9ix6jX4V5 XieGXRrVQkIpEfn74Aql6A8UcQ2tVQMAAA== X-CMS-MailID: 20230419114801epcas5p2eb7e9c375817d827d5175468de34f0cb X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230419114801epcas5p2eb7e9c375817d827d5175468de34f0cb References: <20230419114320.13674-1-nj.shetty@samsung.com> 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, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763607549071365013?= X-GMAIL-MSGID: =?utf-8?q?1763607549071365013?= Setting copy_offload_supported flag to enable offload. Signed-off-by: Nitesh Shetty --- drivers/md/dm-linear.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index f4448d520ee9..1d1ee30bbefb 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c @@ -62,6 +62,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) ti->num_discard_bios = 1; ti->num_secure_erase_bios = 1; ti->num_write_zeroes_bios = 1; + ti->copy_offload_supported = 1; ti->private = lc; return 0;