Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2513883rdg; Mon, 14 Aug 2023 05:13:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG87VnZSLP9oV9wzlC9lQ8BKNau6bkxPMES3rQcl3zapCCERQ39U5lFge79rXKut/ZMBsGH X-Received: by 2002:a19:4f02:0:b0:4f8:5ede:d452 with SMTP id d2-20020a194f02000000b004f85eded452mr5148945lfb.55.1692015181187; Mon, 14 Aug 2023 05:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692015181; cv=none; d=google.com; s=arc-20160816; b=FHaWNCgrlX/wqcWEQBPtnz50E+LJrDTABuPOGufRAgdJrRHFoMOU0V7lGqArJXOotJ 8ia24pmN/z6l7FVmbdO0h5kpxmkIT8A5fXEKRFcIqZ5rW6ksBSaS3PgEnhkZjI1ULnXN esJT1zCiAOpso+zN9D3VFHrvs3H1nXbs2f0KydSDy8O9irG4xEzpUc8ptQA6uy909KRE sCHAQ4DWClHmMik+BS3j4h2NDHmoWr64/tCMlqppFh1lEzWLGEsTTWGfq6M37qVBJPVa FJNaHfyIbiKgj4oieBWVpTN6QU63x9rnR+5p5wwjUl0omuAa9qZ1fgFhkWKx8tj5/qrg giNg== 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=zimQmN124b9hCHDFiSEFba5yy1zwRCykPczhvQAj1Nw=; fh=pDQBpZPllLr8bXpedZbEHupvuBBNxRAFkZCd24PUXDA=; b=GBFemlaeA/DlxnNBR5g/zDen1bY7RkZ5+N66LPrWpXHhtSvMiuQeruQByIjh+vzB/A qMaI+YLYlw9Teg4Hsl7m0OTuTWq5X58x03K7QWex+aq7HULLrJjxWc864iS9z2ZLY+oP 7THounHJEGGHGFoSulH11dXyzaO5Xe0DMBYEMfaoFtGIUfmYf7sf2nbiAdFwBwP10grg mALvVkKZyseGTcXEf97fhkeoa9Q//29ea5MmFBdnXYEvhp7AIbi/hnFZkcwZGTGcjjuP CTi1A7jbv2kOp409OsIwa5RJng8o/mljgoPJ5RxzkdFSvwfgep4HIvkCYER6t++CoRDQ sVgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="IhW/Vsd1"; 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 y2-20020a50eb02000000b0052370772030si7856127edp.164.2023.08.14.05.12.36; Mon, 14 Aug 2023 05:13:01 -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="IhW/Vsd1"; 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 S231249AbjHNLEy (ORCPT + 99 others); Mon, 14 Aug 2023 07:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjHNLEl (ORCPT ); Mon, 14 Aug 2023 07:04:41 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F3331AA for ; Mon, 14 Aug 2023 04:04:39 -0700 (PDT) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230814110436epoutp01b02ebcc30c2c6868be433abd5b6d3735~7OxvmE9G41611916119epoutp01n for ; Mon, 14 Aug 2023 11:04:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230814110436epoutp01b02ebcc30c2c6868be433abd5b6d3735~7OxvmE9G41611916119epoutp01n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1692011076; bh=zimQmN124b9hCHDFiSEFba5yy1zwRCykPczhvQAj1Nw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IhW/Vsd1Y+TcEP/LBgVpOWZFdSHmmW4IDhhC7hC9wcyC9OQp2i9Qp4GW8/+SVphvf IZUTAfZTHNJSj3mDNXUtxkUpE7/aARWFn03aexVrKXiwXuregwC0AIehOuJvLtaZfw SnSM8ce3TbAM/4CWarjbNp5RRiHRzqFQ2/Oe5bqM= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20230814110435epcas5p439e065a790dea8509bce6fb988775511~7Oxu9c-JP2023920239epcas5p4V; Mon, 14 Aug 2023 11:04:35 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.180]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4RPWkS6hHXz4x9Pp; Mon, 14 Aug 2023 11:04:32 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id BA.7E.55173.04A0AD46; Mon, 14 Aug 2023 20:04:32 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230814103355epcas5p114de1c2977fe97f8281218a25ef3a6dd~7OW9zWzlA0591305913epcas5p1q; Mon, 14 Aug 2023 10:33:55 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230814103355epsmtrp2af3e2c51166a8e225642c7d02bb42bed~7OW9yaU--1787017870epsmtrp2j; Mon, 14 Aug 2023 10:33:55 +0000 (GMT) X-AuditID: b6c32a50-df1ff7000001d785-c7-64da0a409dcb Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BC.02.14748.3130AD46; Mon, 14 Aug 2023 19:33:55 +0900 (KST) Received: from green245 (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230814103352epsmtip1bfa9454f6fc7f53da273f13b70b179e0~7OW6ddTKg0808008080epsmtip1p; Mon, 14 Aug 2023 10:33:51 +0000 (GMT) Date: Mon, 14 Aug 2023 16:00:29 +0530 From: Nitesh Shetty To: Bart Van Assche Cc: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , martin.petersen@oracle.com, linux-doc@vger.kernel.org, gost.dev@samsung.com, Anuj Gupta , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, mcgrof@kernel.org, dlemoal@kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [dm-devel] [PATCH v14 03/11] block: add copy offload support Message-ID: <20230814103029.mc5l4wt6y6dzf7db@green245> MIME-Version: 1.0 In-Reply-To: <2e263977-0ee7-ae78-5a8a-2a67df43df76@acm.org> User-Agent: NeoMutt/20171215 X-Brightmail-Tracker: H4sIAAAAAAAAA02TfVRTdRjH+917t91RoxuC/QRRzqJSFNgM1uUt8ER1Cz1xjsc60UGc7MaI sa29iMAfEgkoCJJgySLAo4KOtyRCWixoCIt5kDrIcjPfatgJcIDg0DxQYxc6/vd5vuf5/n7P y3lw1KeM449nyjW0Si6W8d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pty7M2y u2/cNz+6cklKNIe74MWS57ILzHO3NSdn/bj2xnhy29uZi9Ncwy5VbDw2QeD6xKP/e1V8W9/M 9a+YsP3FhVObTgffvp+7lf3LHqez4SYmNcEzLt/Yf323I1NLhbHbCcXVoh9eVwj//OjBaM9e PatA8peP0MKrHrZPmj/d2286N0i4InB6HserhHP7j+Srd3Bxq0VN7m/bulRBQO2LqthX2Xzd yYJsSnXeM84osRRnJBpqMRcVJwIAvUnskl0DAAA= X-CMS-MailID: 20230814103355epcas5p114de1c2977fe97f8281218a25ef3a6dd X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----2jlpTr02XJ1Dz0Ro0nWDo60KkQ.efMTj2bJXEJ.ys0a_1.o3=_545fc_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230811105659epcas5p1982eeaeb580c4cb9b23a29270945be08 References: <20230811105300.15889-1-nj.shetty@samsung.com> <20230811105300.15889-4-nj.shetty@samsung.com> <2e263977-0ee7-ae78-5a8a-2a67df43df76@acm.org> 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 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 ------2jlpTr02XJ1Dz0Ro0nWDo60KkQ.efMTj2bJXEJ.ys0a_1.o3=_545fc_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Disposition: inline On 23/08/11 03:06PM, Bart Van Assche wrote: >On 8/11/23 03:52, Nitesh Shetty wrote: >>+ if (rem != chunk) >>+ atomic_inc(&cio->refcount); > >This code will be easier to read if the above if-test is left out >and if the following code is added below the for-loop: > > if (atomic_dec_and_test(&cio->refcount)) > blkdev_copy_endio(cio); > Acked Thank you, Nitesh Shetty ------2jlpTr02XJ1Dz0Ro0nWDo60KkQ.efMTj2bJXEJ.ys0a_1.o3=_545fc_ Content-Type: text/plain; charset="utf-8" ------2jlpTr02XJ1Dz0Ro0nWDo60KkQ.efMTj2bJXEJ.ys0a_1.o3=_545fc_--