Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1240161pxb; Sun, 21 Feb 2021 17:36:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeg2iz4kGwm00HpFGTdGHeyzLY93RVvXo8CvXd+Jjss2dn68fhPP4D49EpwF/I2d0xHjJB X-Received: by 2002:a05:6402:899:: with SMTP id e25mr9068123edy.212.1613957792903; Sun, 21 Feb 2021 17:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613957792; cv=none; d=google.com; s=arc-20160816; b=YE0Wd1uJ6GphXI7zPc+Awq+D/AfpsbVJSJ31K0r02VIgosnj+9c+yec1px+PcvVyhG g81KSNuk8ZdpfQQGLmQAD2gIgkvQexyqqhCpA2xHkFawdU7iW/E+/BEGauMRozi53m+M 7ygutivRWFmHqftNP1Hbleytx81MOaSIOjqfBI1MDrfCDgWlDMUwrUmFQAgNc9dlBMFY iKBEKxUTEvgsJyaczBGzaCF/syfqo7rVmFDScUbTHnGyK6wkFCxpefvvi6wkhLj96lvC xaKdjEociFKS4ucyQHxJC4fzlSqC5Th7cTR9xhd64lUx6iVvQoDCgmd8zvHvCrfnHZMt kxzA== 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=N34hBKZHkXIxa+0JV+MfgWWrHN+GVw6/8nre7Mkust8=; b=UPoeIXLfh3lWf6wUItyd0lNJ1eEmd74Ja1oPyhAfuYo2Vn5vcvJVw60e7FKZSVQ/ON aoCO4wISzXJzyxTNUIEaZseyONkPj7bG3k7YzTquZFECG9mMn9lFlExpv0OjzaYVOhue al2ByoIsq2bk0CLHjHjbJa9Rk04Mo5Oi9n23gSzyiFVKPFaLug8mMJRl2T39EJbIQNW1 GDa3uQm4AFK7jtd2DUZ43rIw8xAYbmWOJmTgZtI3+VI2mZ6h3aTJOwxPJ2jbYW3xNhpE X2KfMHCedWH1cerrVI/bGW2NCfK8TSQRyEJujb65exiHf/pcuMqKZUk605hlos3E8T6+ siPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BJfyIfum; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp6si13039828ejc.532.2021.02.21.17.36.10; Sun, 21 Feb 2021 17:36:32 -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=@redhat.com header.s=mimecast20190719 header.b=BJfyIfum; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231779AbhBVBeA (ORCPT + 99 others); Sun, 21 Feb 2021 20:34:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44829 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231742AbhBVBdo (ORCPT ); Sun, 21 Feb 2021 20:33:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613957537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N34hBKZHkXIxa+0JV+MfgWWrHN+GVw6/8nre7Mkust8=; b=BJfyIfumHNc8YqdGK0DcPmxoW3zSy6OMjoCp12PjhNU9IfT1YsN0XJVT4Zi3YY9ogcYZuD 4x2A1KgQ92DoFj2zvNpDhL1l7RvjnbCrMs2h7jR6tzuL8hWeqcP7XRbastcU8sjUTjd5Nq DOdMKBmyxKHvoQjul2Pj4jG3VY1G4Lc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-vCCu8_aQNUS3Y2da_gJthQ-1; Sun, 21 Feb 2021 20:32:00 -0500 X-MC-Unique: vCCu8_aQNUS3Y2da_gJthQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EA26A79EC0; Mon, 22 Feb 2021 01:31:57 +0000 (UTC) Received: from T590 (ovpn-12-196.pek2.redhat.com [10.72.12.196]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7972B1A867; Mon, 22 Feb 2021 01:31:37 +0000 (UTC) Date: Mon, 22 Feb 2021 09:31:33 +0800 From: Ming Lei To: SelvaKumar S Cc: 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, linux-scsi@vger.kernel.org, "Martin K. Petersen" Subject: Re: [RFC PATCH v5 0/4] add simple copy support Message-ID: References: <20210219124517.79359-1-selvakuma.s1@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210219124517.79359-1-selvakuma.s1@samsung.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 19, 2021 at 06:15:13PM +0530, SelvaKumar S wrote: > 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. > > This implementation doesn't add native copy offload support for stacked > devices rather copy offload is done through emulation. Possible use > cases are F2FS gc and BTRFS relocation/balance. > > *blkdev_issue_copy* takes source bdev, no of sources, array of source > ranges (in sectors), destination bdev and destination offset(in sectors). > If both source and destination block devices are same and copy_offload = 1, > then copy is done through native copy offloading. Copy emulation is used > in other cases. > > As SCSI XCOPY can take two different block devices and no of source range is > equal to 1, this interface can be extended in future to support SCSI XCOPY. The patchset adds ioctl(BLKCOPY) and two userspace visible data struture(range_entry, and copy_range), all belong to kabi stuff, and the interface is generic block layer kabi. The API has to be allowed to extend for supporting SCSI XCOPY in future or similar block copy commands without breaking previous application, so please CC linux-scsi and scsi guys in your next post. -- Ming