Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5693695rdb; Wed, 13 Dec 2023 17:11:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUC6+jXXEqIsjzRxL+licHDmgTHmRs721kBtvtjCQBv6I48r89Ch/genJ3YbAIQhoG9Eor X-Received: by 2002:a17:90a:b947:b0:28a:ea46:420e with SMTP id f7-20020a17090ab94700b0028aea46420emr1680031pjw.35.1702516296649; Wed, 13 Dec 2023 17:11:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702516296; cv=none; d=google.com; s=arc-20160816; b=LaXIcakENOZK+cWhOuOlbIPCzIiToi1crCA+AzJ85xW1x/ZRUPJjA+46UpzoD+jqQ6 DFP086z/+HDywgcAq8JDbhc2pVzUwmDGT/SPWqflBZjrIFjtTo30CwMoyXyknSPlznUZ L2hbbjjFk1ZaCA8aErUVtTMbhRfDinGoLqVCdxaXL6zjtwNmGiDsemfKhJRycQNnlSqb hlKHBAtomC8XrA5p5dmcbAIDRsrOreSfOT/zIEIDXq4ULVxff6VgmZOfFRK+DVV4xHjp fXmYv9Nj/0/gcxmOMpNzj2fcaPqbbSCb1AlFyrMv2dM9fqGSMIXXKR+9MVIcfe631z0j xU7w== 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=yea0NFt9MO5hPr1/WrkhFyA3OXVNRnjm3vZ9sUIVSSk=; fh=GIEC2LSfHxgu6Beioytjj4N1PgBx6okI1jfYSsmczyY=; b=XQ6hv4tRTEUk94hSHzvR+O1DlLFkumQxlDO+Us9xAYTZJu8+nD21b7pM/cAD9vRe8P JzwNrriCTjMCoKJNaHQdqSRxTUThI6nHVR05q/C0jP5v7uyQJfcL2RL916LeN0Ub7oMr MsmGgfiwo5djFCNsepPEc5wucxfhkGJdXFNmTSydMsjQS7VCnOQ0bUNylVcKoYdoGXr1 2T6vokG0XWFNJavza9wXv3S258wwwuqswCbQU157M1kC6c1yxadB+iwinINjpEdBVpT6 ixoTFnzizWbHTXnMSKq9B8Iw3ifS9frwP7jM3q/urrskI6Wu6S4+0RtAvDLtAZXEAGhV k9pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lSq1uGLr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v10-20020a17090a898a00b0028878f6a971si10527518pjn.99.2023.12.13.17.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 17:11:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lSq1uGLr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id ABB38802C685; Wed, 13 Dec 2023 17:11:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234093AbjLNBLT (ORCPT + 99 others); Wed, 13 Dec 2023 20:11:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjLNBLS (ORCPT ); Wed, 13 Dec 2023 20:11:18 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0FBB7 for ; Wed, 13 Dec 2023 17:11:24 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F6B2C433C8; Thu, 14 Dec 2023 01:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702516284; bh=XwoFjsJDwQ9a2+DWM4rjeegVkzh/lxFGbWD3rYfyGcc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lSq1uGLrFIRUTnVT3AS20PIwVXDWLgO8ozWsfsDZWaPJjk8n3u8l/eWwAv50O0EMd u8lxxL9Y4sSkGifdgqH3/YI4+EmFlAIdAVSI/mgcQl9karZZTwtudxVBlp5VpjaMxu SjagbjSDOcAhlUiBn/nkeM13SGJb/wwTwxfblLge9zGFRonPJ2SBordG8cRqdYFNpI 3vAf2yXumJqwsUhu2Qb2L2P3bTvd2tZKU5prXoqDMiIFx8b91cZLKRNAPDnqn2anJK 4lsRsLROKyVu60uG6cdSuihgOfEcCuT+ZirEHhGzdijeXu7TpvPoxov1wnMfqIDbmI CMP4+mM/C2Qxg== Date: Wed, 13 Dec 2023 17:11:21 -0800 From: Keith Busch To: Kanchan Joshi Cc: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , dm-devel@lists.linux.dev, Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , martin.petersen@oracle.com, linux-scsi@vger.kernel.org, nitheshshetty@gmail.com, anuj1072538@gmail.com, gost.dev@samsung.com, mcgrof@kernel.org, Nitesh Shetty , 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 Subject: Re: [PATCH v18 02/12] Add infrastructure for copy offload in block and request layer. Message-ID: References: <20231206100253.13100-1-joshi.k@samsung.com> <20231206100253.13100-3-joshi.k@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231206100253.13100-3-joshi.k@samsung.com> 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_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 17:11:29 -0800 (PST) On Wed, Dec 06, 2023 at 03:32:34PM +0530, Kanchan Joshi wrote: > static inline bool bio_has_data(struct bio *bio) > { > - if (bio && > - bio->bi_iter.bi_size && > - bio_op(bio) != REQ_OP_DISCARD && > - bio_op(bio) != REQ_OP_SECURE_ERASE && > - bio_op(bio) != REQ_OP_WRITE_ZEROES) > + if (bio && (bio_op(bio) == REQ_OP_READ || bio_op(bio) == REQ_OP_WRITE)) > return true; There are other ops besides READ and WRITE that have data, but this is might be fine by the fact that other ops with data currently don't call this function. > diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h > index 7c2316c91cbd..bd821eaa7a02 100644 > --- a/include/linux/blk_types.h > +++ b/include/linux/blk_types.h > @@ -393,6 +393,10 @@ enum req_op { > /* reset all the zone present on the device */ > REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)17, > > + /* copy offload dst and src operation */ > + REQ_OP_COPY_SRC = (__force blk_opf_t)19, Should this be an even numbered OP? The odd ones are for data WRITEs. > + REQ_OP_COPY_DST = (__force blk_opf_t)21,