Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp517001lqp; Wed, 22 May 2024 10:59:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV52vberfjx+uIzzpNgLnotKYR9bkhEUWpAMznMAtMZeteUfQk+K3IjdqQ6W99zt01uPZh/bxp1aWJp8WAgEfuUPW8UQjptWciLGC72tg== X-Google-Smtp-Source: AGHT+IEDpT57CPhwN0a4Ya6ksHCV86lTT9xMf8cxcemZGi3td6+xcQ1iD8zVIYUtC2fGSzSLcf3O X-Received: by 2002:a17:902:cf04:b0:1f3:2fa7:6d7b with SMTP id d9443c01a7336-1f32fa76e61mr17483365ad.19.1716400765849; Wed, 22 May 2024 10:59:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716400765; cv=pass; d=google.com; s=arc-20160816; b=y2U1NsLhTdVTFzzGvAtAwiIDk0TRxeRm5dUnZxsyyJVq0uwls5A3r5JZwn52enRTf3 ELkGNIsIsLK6VoudXj61dovtcvdg2oEbZNZSniNJmSO19TTuCJq+PTrDAAgxacuQyiXN tPTc8gVDNLRi9Qp3DVNkY+K1ulu6ixQOVh+J780HtpK2CgV4mkIJMtLFcM5FRjElFRhk qsByz3ankzayx7/pM1KaQsWT4gNbJTUd7x5Nnhbv+wOq0WDy9/dEi4U7UQMJO3rGTLz/ CNeOGjvemHFolt3Y4NR3B5D2OiHWrQSnHm3nvMZUNhmGdxGOjJuLptlZPcIiCIlysqE4 EG/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=/fUnCyL4rXX2AQtUspHQvGeVSI9WBvUN5ojnjLO8HQA=; fh=uhTjV+3K0BskeJVmGWADkyefo+MJDVphrwr/ahoFASE=; b=Ih8s9+fSYzBZ45MAKh5i/4zNfmmeNiWI/sFR3FFyCRRcQFoFJg2HKuiEiKH4/8SMcf EPDwMbXcgGReFEM+WzX8A0tq4MTNsi/HM/dmAf2GE136oqC8hhvsI0thc/YQ5GL5I5m1 xEzjDnVINALXoKrbE+WyrI+XTlS0cAKE7Oi+dz42wEZ4O13PBy3ZMjiMCdkbnQk6Tonz raHQ0ppUiWEMAeAcQmeB0JF3M6kJiJW0IBTXuRk8f/uPt4LJ/MtjdSVhyHQTBsnuQamj mPGdPGdAriekZSHLyq9tsb/6hrYxQ0vDY2mz6NUn3cPuYXGiycnbyJTpBRg41k7WxdY3 zrng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@acm.org header.s=mr01 header.b=2NXb5bWG; arc=pass (i=1 spf=pass spfdomain=acm.org dkim=pass dkdomain=acm.org dmarc=pass fromdomain=acm.org); spf=pass (google.com: domain of linux-kernel+bounces-186581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=acm.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f30b999759si3948865ad.234.2024.05.22.10.59.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 10:59:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@acm.org header.s=mr01 header.b=2NXb5bWG; arc=pass (i=1 spf=pass spfdomain=acm.org dkim=pass dkdomain=acm.org dmarc=pass fromdomain=acm.org); spf=pass (google.com: domain of linux-kernel+bounces-186581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=acm.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D4899B21A64 for ; Wed, 22 May 2024 17:59:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4BAFA46AF; Wed, 22 May 2024 17:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="2NXb5bWG" Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BA6282877; Wed, 22 May 2024 17:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716400727; cv=none; b=Hs0QEzdOhQWmbG8p9nQEIv7GaAidlgihz58UYKStVic6Q9aWfAp7g3wxWe4jXTvlRyazqhK+/3vZcfFThSA+M8xjY91XVm/AoycClm7KGiEM2parhCT4Gj/Nu3aZkn7WPhViVaVhXaYNd78tznh/wnpKDri/Y3vpyyHTrZD83DA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716400727; c=relaxed/simple; bh=/fUnCyL4rXX2AQtUspHQvGeVSI9WBvUN5ojnjLO8HQA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=K2nM1n8VhxLPDYzb4oIufbWjoWxQyeLgqIt+wopOelZWXvphZaWq9+bUU4ljLmX8T4ix3ViLppDHmdHW3kQZGZshlJAwAW+0dw0VxZZFZu6T/k4NUUpmHLULYbrqbCBTx4pAZl6m1HwKeKZYZWxtoafl61he5N0mlGWT8cCMaTE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=2NXb5bWG; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4VkzZF3LmfzlgMVN; Wed, 22 May 2024 17:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1716400717; x=1718992718; bh=/fUnCyL4rXX2AQtUspHQvGeV SI9WBvUN5ojnjLO8HQA=; b=2NXb5bWGOG3VkvoOW/1AJ/knPpCcKds88i+1padz gFfE5fJ7PzdLZoQbo81PtZWYvVj1Q2FaHh1UQLiTDNI2ukoCNAbJ+Nl4g0u0NxC1 VFMGvH9ZW6chjnwY+pnV3bx1kPOLj3pBNscI2CIVjtcFel083RWJglTIwGpbB4pJ bJhkKlRV4JZQ+dsHgKmxqRXb6ji4hq4XRfi27/mhn23bow5S9+pZ6h5Fg3QEfT+b 2LzHrguzq2mNP2MJ9Y2iMxIvL5pwEWYwp0kdwPm7JldrbYn5lI2FL0SSqRhARbEU uLSMvifOyC0AND8nUQGjb/uPQ0TgHhjqr9UemL6WR7fA0Q== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 9NZjL2GE8PQb; Wed, 22 May 2024 17:58:37 +0000 (UTC) Received: from [100.96.154.26] (unknown [104.132.0.90]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4VkzZ21dlYzlgMVL; Wed, 22 May 2024 17:58:33 +0000 (UTC) Message-ID: <53b30f65-6b0f-4c05-8372-023e5e61a035@acm.org> Date: Wed, 22 May 2024 10:58:33 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer. To: Nitesh Shetty Cc: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , Keith Busch , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , Jan Kara , martin.petersen@oracle.com, david@fromorbit.com, hare@suse.de, damien.lemoal@opensource.wdc.com, anuj20.g@samsung.com, joshi.k@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, dm-devel@lists.linux.dev, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org References: <20240520102033.9361-1-nj.shetty@samsung.com> <20240520102033.9361-3-nj.shetty@samsung.com> <086804a4-daa4-48a3-a7db-1d38385df0c1@acm.org> <20240521111756.w4xckwbecfyjtez7@green245> Content-Language: en-US From: Bart Van Assche In-Reply-To: <20240521111756.w4xckwbecfyjtez7@green245> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/21/24 04:17, Nitesh Shetty wrote: > On 20/05/24 04:00PM, Bart Van Assche wrote: >> On 5/20/24 03:20, Nitesh Shetty wrote: >>> +static inline bool blk_copy_offload_mergable(struct request *req, >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= struct bio *bio) >>> +{ >>> +=C2=A0=C2=A0=C2=A0 return (req_op(req) =3D=3D REQ_OP_COPY_DST && >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bio_op(bio) =3D=3D REQ_OP= _COPY_SRC); >>> +} >> >> bios with different operation types must not be merged. Please rename = this function. >> > As far as function renaming, we followed discard's naming. But open to > any suggestion. req_attempt_discard_merge() checks whether two REQ_OP_DISCARD bios can be= merged. The above function checks something else, namely whether REQ_OP_COPY_DST = and REQ_OP_COPY_SRC can be combined into a copy offload operation. Hence my r= equest not to use the verb "merge" for combining REQ_OP_COPY_SRC and REQ_OP_COPY= _DST operations. Thanks, Bart.