Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp512723pxb; Sat, 20 Feb 2021 11:14:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcsSPM3clLkOI8zDcEEJlBvuIlHk9/LNj3VPB19wu/mPITI6Nk05BaIjNnZjb+I3YGD9E2 X-Received: by 2002:a17:906:184e:: with SMTP id w14mr14507433eje.56.1613848444953; Sat, 20 Feb 2021 11:14:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613848444; cv=none; d=google.com; s=arc-20160816; b=o4xRrhpkY7BM04G/l+iKx0ktNfe23Qa8DHZ+tG5TYhKwDTdR3HDjHUTn92wxjm7CrP NkVMZqgqHKQx4rlm9J+DrQ5O4TonkjMGZynx9FhvMYb2xgisv8r7rs/T07ssUPoszDkP wvFXgP0Xjus7+ltnBr4wQqDI+1OtI4t1bezYPa9oNsOSBMbaK8EAOHMwNHKP8VvrrXjW lA/Ww+DPP+BJzsEkbEFl3+Jf8bUDXkpuIDGtbmdTkRpifBBTraipsOwBxMqY4Z1sGdHW V7XIKaE1Y9uueZoM+uGZbVHMToF5+692bKSJIoTvbaMgMdGi3AJr+0hLak6x4id3rhQ1 qcZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=z8+/WNpbsZkqwy3FrYALDel13DrFd2M7SHQC2LqXykk=; b=PdUuCKVI17J7e1XZSYlRj0vRuzF1idPEZvSh0og1s7vYTGv4BEk6Xt5NlknHQkjiTm VTrNR6TQ6PvhjRlXLkDTHMPhh7S/cQkrdF9kfidYPo2fLlTvQ1GfMso0tVnz/l61LPYp 0nNDcF/wkZBoGvexnCNHiPf/MLmYrGvuvyqHEj7wqCOBO+0tmjRDzw+sCSN+G7TdMonm Ext0tsIpW+dEH2z6XcAOPUex2VuxdB6znUnYMLnvHZWgR0fzRGyZXK8GvWmZuSlHzYZD Iv+hs1eb5uR0AJFxIzT0r16GG9I4K0XtLGVpRHTod6Kn0mL+KvDgCDBCFa+xv8Gbzj4z LC3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Coqv5TZ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si7912072ejb.131.2021.02.20.11.13.32; Sat, 20 Feb 2021 11:14:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Coqv5TZ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229959AbhBTTLe (ORCPT + 99 others); Sat, 20 Feb 2021 14:11:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229796AbhBTTLc (ORCPT ); Sat, 20 Feb 2021 14:11:32 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA018C061574; Sat, 20 Feb 2021 11:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=z8+/WNpbsZkqwy3FrYALDel13DrFd2M7SHQC2LqXykk=; b=Coqv5TZ84pbYV63BlHltSBs+O6 PKlkeMKd9GjQBqahXNppgY+/xX6UfosepmWfMMZGYxfbMYZLokGKnYGxzrHd//hRD3ea6ydPU5Ytr jk14BWdCLSI0Xjk4dUlY/0AuGf7+IS46QTKPcxQDHjVPt697wE7M9ASyd68sRt67wCFENbj1Sy0kt KqqHpoWVrNfHkIOOJDK9bcVxCM3THBS7gsYqggibHRGGsuhhWcqYjoHcE5wj4W2q5T06Uq2cui7oH FimgH0MLEq4pfqGbJ2iPd/+91tRxJFefAI/iiGCu+kY3koSvRTlYD9gNzRUZzIek5wvaRqZ0H05K1 L7LLTzpg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lDXcL-004MAE-36; Sat, 20 Feb 2021 19:08:48 +0000 Date: Sat, 20 Feb 2021 19:08:37 +0000 From: Matthew Wilcox To: David Laight Cc: 'SelvaKumar S' , "linux-nvme@lists.infradead.org" , "kbusch@kernel.org" , "axboe@kernel.dk" , "damien.lemoal@wdc.com" , "hch@lst.de" , "sagi@grimberg.me" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dm-devel@redhat.com" , "snitzer@redhat.com" , "selvajove@gmail.com" , "joshiiitr@gmail.com" , "nj.shetty@samsung.com" , "joshi.k@samsung.com" , "javier.gonz@samsung.com" , "kch@kernel.org" , "linux-fsdevel@vger.kernel.org" Subject: Re: [RFC PATCH v5 0/4] add simple copy support Message-ID: <20210220190837.GE2858050@casper.infradead.org> References: <20210219124517.79359-1-selvakuma.s1@samsung.com> <146c47907c2446d4a896830de400dd81@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <146c47907c2446d4a896830de400dd81@AcuMS.aculab.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 20, 2021 at 06:01:56PM +0000, David Laight wrote: > From: SelvaKumar S > > Sent: 19 February 2021 12:45 > > > > This patchset tries to add support for TP4065a ("Simple Copy Command"), > > v2020.05.04 ("Ratified") > > > > The Specification can be found in following link. > > https://nvmexpress.org/wp-content/uploads/NVM-Express-1.4-Ratified-TPs-1.zip > > > > Simple copy command is a copy offloading operation and is used to copy > > multiple contiguous ranges (source_ranges) of LBA's to a single destination > > LBA within the device reducing traffic between host and device. > > Sounds to me like the real reason is that the copy just ends up changing > some indirect block pointers rather than having to actually copy the data. That would be incorrect, at least for firmware that I have knowledge of. There are checksums which involve the logical block address of the data, and you can't just rewrite the checksum on NAND, you have to write the entire block. Now, firmware doesn't have to implement their checksum like this, but there are good reasons to do it this way (eg if the command gets corrupted in transfer and you read the wrong block, it will fail the checksum, preventing the drive from returning Somebody Else's Data). So let's take these people at their word. It is to reduce traffic between drive and host. And that is a good enough reason to do it.