Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20438439rwd; Thu, 29 Jun 2023 02:13:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5etQODop4oZdI7/aqZrJTJHEyZNIiCEj4CmENsqV/zSYZo/5LfJX9TKsyJeJT+zpMjznwd X-Received: by 2002:a05:6a20:258d:b0:10c:7c72:bdf9 with SMTP id k13-20020a056a20258d00b0010c7c72bdf9mr31204066pzd.29.1688029984160; Thu, 29 Jun 2023 02:13:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688029984; cv=none; d=google.com; s=arc-20160816; b=J7Ab0wIJG/kKVDmbT4iASZqTf6SmHj9xXmJPQPAsXuY8ptzSfLwkY1PgnQgKImuQDq VwuDc95CO4hTPU2XrEB1PePu5BWrgNZhorKQJdXxf8YmaOV58a1lhCaehb+Uwt4iQhnJ TqJLxWCHfcM6a2kumxzQU3UCT5XS7jCbAw8TJot1OhN1sKnVWnCVrE6UGtx/BnDq8uJL +J6B8ByGdMokw8/LcdnjPUs1c/GJCoE5wbwrU7sLdh2Xcj15MBLkAAqXfVu2YI/ToHTW WvZmJN9AG+GpJMj91AVnls1ZcV65ZMo6D579F4LHRCejarEpoHV6HvBK0h0jmvICcho+ GtfA== 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=lcFzJ0h/r4o640kKx9oD5oKaAf0iz+R8cp1bGbk+mhI=; fh=7CzgsBaAUTNdvFvpBg8S7zi7x4gB5h36d78YLRUgblU=; b=0v5UKeCXG5QsTW6UJcMIuzCD+jiJB9lMo/WfN1plU7CLBhTU0zzzlNt2Bwxh6Trdkg Pfzj+mUgowyMViKNRHNORVzizkVe0jPIZYMs1NaxNg2Qj/CoBxe7w8u+EPD1u7AFihoa nSgejaMliA2W9mfvTcYuRVP4Q/FImzPFlv/9Tjmt3lNjkGVFKmsPIpXAx6qKU1WIe6K1 sQEuaXD6n5xunR+hva/rJg+k8N6hvszpVSiOxwLVZXXdIULqD37tacv6S8IllSp6fv+k s/vtOdoyPKSjezPPmMvFXrdQOL4b9gzRdfzhKhRLrM6+qqn+4aRNNiaYILxLaW8Vs7+d NTPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y8Ibzx+Y; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fc9-20020a056a002e0900b0066a1f3a9190si10370758pfb.207.2023.06.29.02.12.49; Thu, 29 Jun 2023 02:13:04 -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=@redhat.com header.s=mimecast20190719 header.b=Y8Ibzx+Y; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232244AbjF2Il7 (ORCPT + 99 others); Thu, 29 Jun 2023 04:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232201AbjF2Ik6 (ORCPT ); Thu, 29 Jun 2023 04:40:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2A1F559E for ; Thu, 29 Jun 2023 01:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688027654; 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=lcFzJ0h/r4o640kKx9oD5oKaAf0iz+R8cp1bGbk+mhI=; b=Y8Ibzx+Y7wDGXaP9ptojZzSSOC0tWwkwgATVGuq+Xt6EdpFzFM1zLx+mIEuLw22K/2NsZ5 W11pgRnb3vSBVFuJ/FUmLbJorFUiWsrHKm7dclSVQ+DESl5m/S9AijeA/79wFSdSfS6hkB fjx/OCSrM632Dl6K3yJNM4WunPQ2miM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-P89DQgOTMauKEphGgInR0w-1; Thu, 29 Jun 2023 04:34:04 -0400 X-MC-Unique: P89DQgOTMauKEphGgInR0w-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BF498104458F; Thu, 29 Jun 2023 08:34:02 +0000 (UTC) Received: from ovpn-8-26.pek2.redhat.com (ovpn-8-26.pek2.redhat.com [10.72.8.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F8C5492C13; Thu, 29 Jun 2023 08:33:32 +0000 (UTC) Date: Thu, 29 Jun 2023 16:33:26 +0800 From: Ming Lei To: Nitesh Shetty 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-scsi@vger.kernel.org, willy@infradead.org, hare@suse.de, djwong@kernel.org, bvanassche@acm.org, dlemoal@kernel.org, nitheshshetty@gmail.com, gost.dev@samsung.com, Vincent Fu , Anuj Gupta , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, ming.lei@redhat.com Subject: Re: [PATCH v13 3/9] block: add emulation for copy Message-ID: References: <20230627183629.26571-1-nj.shetty@samsung.com> <20230627183629.26571-4-nj.shetty@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230627183629.26571-4-nj.shetty@samsung.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Nitesh, On Wed, Jun 28, 2023 at 12:06:17AM +0530, Nitesh Shetty wrote: > For the devices which does not support copy, copy emulation is added. > It is required for in-kernel users like fabrics, where file descriptor is I can understand copy command does help for FS GC and fabrics storages, but still not very clear why copy emulation is needed for kernel users, is it just for covering both copy command and emulation in single interface? Or other purposes? I'd suggest to add more words about in-kernel users of copy emulation. > not available and hence they can't use copy_file_range. > Copy-emulation is implemented by reading from source into memory and > writing to the corresponding destination asynchronously. > Also emulation is used, if copy offload fails or partially completes. Per my understanding, this kind of emulation may not be as efficient as doing it in userspace(two linked io_uring SQEs, read & write with shared buffer). But it is fine if there are real in-kernel such users. Thanks, Ming