Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp373603rwb; Thu, 12 Jan 2023 07:17:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXsbCRC4gZUgzVvCKSsL4gnWBdKMnteIuU/Auz8VZvSVJ+cBWl3eUW547gWxfLB28cvBU6kO X-Received: by 2002:a17:90a:db43:b0:227:3ab:3e5f with SMTP id u3-20020a17090adb4300b0022703ab3e5fmr17204393pjx.41.1673536666334; Thu, 12 Jan 2023 07:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673536666; cv=none; d=google.com; s=arc-20160816; b=rxpo00cpPkS164lhSokLQrJwCfPEdq54HdjgivJcq81KcSWtAyvhcqvAj768pLx7/C m/petpDVWoDu2kSZDtVCdVhV9SxLf4UcTe/fUgU1x1LR45q5S7fT+EFK7AQhG701ZJLx M/KdOvkpv/Htiur3SKFA84kUmuBXLBVe5El6iqjDiKprN4T91MEZtYXo2JDFROKFrwHJ rRKHLhrbcAZuolsE7mICZwz8x4Y/B+oNElCI+psasr+8aE1FX1Ml13O4w6hRJW/vlEdi v3pH+pU4B7DVDi4SJUhYdLCO4wG3EWnjtmrQCw5RuDE9zZiaWZkCnrKl3AYCUgV3bcBr DJsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=HrBrg5QvUAIEV+jz3DGdQVqQeKMcVuJL634mtXFHdsI=; b=i1h1gLaUQCzevxUQnXmV6Rwt6E0dTl1yZksADmBhvNAYFBOcCZFCf5qQNwwBl24b4l Xz96UMoSWljcc2IaX9LMvZvOqo7bCxR0Mt9i6fp4zUcwZtr091Lc4I0f0reiD/S0STUT ET+E9W8GhRZ2enlfmXbGEVUhOh3Xbo7K6hAQkzDw05v7+EKxE8IMd84kF0EFNmWdJJE7 oSHWRk+S4QdbEGkIf+ry2gKDEbuEqg+uw0qCqUDYDhqE9/mqsBo/EWy3RfBeigv/8mz2 vjXOABo7jh4g5uJBsrX9okAnXeVVYoEGoketYFWEJcdARVR9lsnoMnw058qZeQtM1WFK b1ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="rvj8/WFL"; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a63460f000000b004769246309dsi17211534pga.501.2023.01.12.07.17.39; Thu, 12 Jan 2023 07:17:46 -0800 (PST) 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=@suse.de header.s=susede2_rsa header.b="rvj8/WFL"; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240289AbjALPBQ (ORCPT + 52 others); Thu, 12 Jan 2023 10:01:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240141AbjALPAx (ORCPT ); Thu, 12 Jan 2023 10:00:53 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BFBC68CB5; Thu, 12 Jan 2023 06:46:19 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0A5D63FEBB; Thu, 12 Jan 2023 14:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673534777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HrBrg5QvUAIEV+jz3DGdQVqQeKMcVuJL634mtXFHdsI=; b=rvj8/WFL8TbAB2ZWnYy2bPxp2tVG8pK6sI6j6WkIQ3UIdb+de+5QB/PO+3tldpBtdLYhVC mV+pOw6U3OR0KWe1atjFENO0aOUJin6qs/IXbkuqRyFwZqFqslp1DYPhS/6akESIzqZrJZ gsSwliW057MSrOwOR9pKwNH7j5l7PPA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673534777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HrBrg5QvUAIEV+jz3DGdQVqQeKMcVuJL634mtXFHdsI=; b=ksPyq5Qj7locvziy9JH6dr1AxpNnr4pHprnB3EftuUgp4QpX8QuSTv3VOqEjgavELrrL6f UTaC7oQ+mh8kFcCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DAFEB13776; Thu, 12 Jan 2023 14:46:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ++8qNTgdwGNiEAAAMHmgww (envelope-from ); Thu, 12 Jan 2023 14:46:16 +0000 Message-ID: Date: Thu, 12 Jan 2023 15:46:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v6 3/9] block: add emulation for copy Content-Language: en-US To: Nitesh Shetty , Jens Axboe , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro Cc: anuj20.g@samsung.com, joshi.k@samsung.com, p.raghav@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, Vincent Fu , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org References: <20230112115908.23662-1-nj.shetty@samsung.com> <20230112115908.23662-4-nj.shetty@samsung.com> From: Hannes Reinecke In-Reply-To: <20230112115908.23662-4-nj.shetty@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 On 1/12/23 12:58, Nitesh Shetty wrote: > For the devices which does not support copy, copy emulation is > added. Copy-emulation is implemented by reading from source ranges > into memory and writing to the corresponding destination asynchronously. > For zoned device we maintain a linked list of read submission and try to > submit corresponding write in same order. > Also emulation is used, if copy offload fails or partially completes. > > Signed-off-by: Nitesh Shetty > Signed-off-by: Vincent Fu > Signed-off-by: Anuj Gupta > --- > block/blk-lib.c | 241 ++++++++++++++++++++++++++++++++++++++++- > block/blk-map.c | 4 +- > include/linux/blkdev.h | 3 + > 3 files changed, 245 insertions(+), 3 deletions(-) > I'm not sure if I agree with this one. You just submitted a patch for device-mapper to implement copy offload, which (to all intents and purposes) _is_ an emulation. So why do we need to implement it in the block layer as an emulation? Or, if we have to, why do we need the device-mapper emulation? This emulation will be doing the same thing, no? Cheers, Hannes