Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp374086rwb; Thu, 12 Jan 2023 07:18:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXt1m7s3o/TBz2A7uBBRxOKEPU7zg3f38glqt/NVSBixf/KNfzog9gwI6mEYe3EZwvYIDHts X-Received: by 2002:a62:2544:0:b0:589:8fac:cfe5 with SMTP id l65-20020a622544000000b005898faccfe5mr11929712pfl.13.1673536684194; Thu, 12 Jan 2023 07:18:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673536684; cv=none; d=google.com; s=arc-20160816; b=bCoxtOdYC6LHQK8qeSwpaDrdnEcHP40s/k8Olul+L8kwaNgn3VTO23rRhGrCr9K5G2 1XmXdVNWCiHiZ5M/mFVw3ifNF98gAej/xitVh4TAtFLwZuGofjakWjF8sPQAqb6E24m2 ivkMf+zpTz8CS6hJa7+vupMMrZ+Jc+4Jmg0tf6Qtx+wDZmO5/TxnS910yHbOdyM3HqIK +WehYBl/51aCDOY+xg5lrTsSy7BgnnCYzE+rx7jYFhWlB7x5GSG7vdWvpfBNRA2KJxMt yrUbm/W5TQLBHnOekc1BXJ/vWjKXzgQoKpbK9X4aNdfz3pQTKzgst/tas4kVMCClzme8 Gsag== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature; bh=zsa+fdfwdlDM2GetrLrqpou94nUfON/csukFq2m/izo=; b=pzxeGVmWR4yrp+fPZ9GYjnAjpZo9TvsHdY0e2QSH/0zW3/Y6paSEegSOKqnQMogpUs xGuSMyjmUmbpvIUsE6RvmAe3B2O6uYseppTlBidXBNbFnOSUvZybAL7Xvvpb8l3+CF0E X5gbpvu1KWwcof6nzEbydFtGGfKxYdXEuRAMShag6EPUCTerbcQxpnHbAFJvocgJ34QM we9VHqguTkUuIwm1aX0RIX5A41/F19lOGQ3DciJ6UzpOy0LO/d9JVOlkGkhnzbstz5CO zPVB1gXVxCxHsyBPDuznuZbPGxn1Z9e4UPAyJRyJdoNYzcm6GJUZh0MLUxuzuvYF8sVV aiTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="kSH/6kvb"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=2KNJsOzq; 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 z24-20020a056a001d9800b005879278c7fesi12711237pfw.317.2023.01.12.07.17.57; Thu, 12 Jan 2023 07:18:04 -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="kSH/6kvb"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=2KNJsOzq; 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 S240304AbjALPCt (ORCPT + 50 others); Thu, 12 Jan 2023 10:02:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239778AbjALPCX (ORCPT ); Thu, 12 Jan 2023 10:02:23 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB3D86A0C5; Thu, 12 Jan 2023 06:48:34 -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-out2.suse.de (Postfix) with ESMTPS id BD0B03F0CB; Thu, 12 Jan 2023 14:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673534912; 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=zsa+fdfwdlDM2GetrLrqpou94nUfON/csukFq2m/izo=; b=kSH/6kvbmwFCrzEEWGGvL2I7yKz/0cDBLQGnVISP472mTr6ExKDickiXG6C6K+KZtX5iuG tOz/EgxbD9EltuY8CoTfas6xed9+rz+XZSvZD5nZq5QFCAPmfEStsRo2imWcxLR4WSq3Bj UUU+eukN0ulxKY0Yv+szQQi4rm476TQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673534912; 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=zsa+fdfwdlDM2GetrLrqpou94nUfON/csukFq2m/izo=; b=2KNJsOzqPWJTzkRPymaNqNliovVGM6bjPs1WxlGHd0wVD9lIsbdd9Y3kxcnBOE7z9QB0Ne s3obyhpx6c60AwBg== 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 836B913776; Thu, 12 Jan 2023 14:48:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id /6ZkH8AdwGOIEQAAMHmgww (envelope-from ); Thu, 12 Jan 2023 14:48:32 +0000 Message-ID: <20d7fde4-dd17-de97-53e8-aa808a325efd@suse.de> Date: Thu, 12 Jan 2023 15:48:32 +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 From: Hannes Reinecke 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 15:46, Hannes Reinecke wrote: > 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? > Sheesh. One should read the entire patchset. Disregard the above comment. Cheers, Hannes