From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7853CC433E0 for ; Mon, 22 Feb 2021 01:34:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4AEEB64EC3 for ; Mon, 22 Feb 2021 01:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230376AbhBVBea (ORCPT ); Sun, 21 Feb 2021 20:34:30 -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