Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2231144rwb; Thu, 27 Jul 2023 04:21:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEj7k6f+hNy78lKJYh8500ro4z3rXrUWMwDxhiB2sSkcmJw/LJSn/8uKs/CjL0NmXmK0RQK X-Received: by 2002:a17:90a:e28d:b0:261:2824:6b8c with SMTP id d13-20020a17090ae28d00b0026128246b8cmr2802571pjz.13.1690456912352; Thu, 27 Jul 2023 04:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690456912; cv=none; d=google.com; s=arc-20160816; b=TO4+zQsxSnFlZo+0zlGx+4kanX8/7b8SKp23dyzjaVP+ym2e07j3yTQChVv0TpIzSZ La6O1/EU4UIPi5N9jIlg9V+nptVChaccxGX69/tcYuK5IWuOx0kYi8kS1lXwRbKzHsFp jc6eVPCuifb3koHQrNty8soQSKeXNYltx7QZVSgKOSGfFGeFiZjj5od6fOfdI9EFTbqg Eh2+UESLiwzyS+SsBV4yaOyE5rHLVmbjg4/pHVzg09RkhTKTu1V1svSNtVEghPfBpqPP PW1Ck7I+cUvxEi+8z1ORlKSmf7HUVPtrECkFSzsh30K6GZk67oR9oTvPrw3Z2taSAIhC r7gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=omUaDYixzWjtTMpLHRqhT6EXYqbxVHZ/m0JLSVt+zRU=; fh=on6Nthw+7dfsD/1XmNKYqYUnXJiChQ4v2lolSRu6GUI=; b=YehZeWnUOD2VFCvIshuO+CR1PPldE0ea8+wi9X1/MbDXGZwQtGwOpyIfVa7QmrOd6o +Cyzj55Mho3wZleLpLoA+f2upgVOH8SON6SfbJZ02FY3g/Nix7OTN523VOrty8FtWkQn xHoi8synB+NrQt2C3ovWRY8tjjTjKFBvEqR0Hjt47y7l2X9eSANwc+Mh/+nkuodutqu2 PAqTTsgRE/qPx471zrcpk93Skyl7nW7cfxtoRuixJyYIrC9AftX9ebqr9DcNSjx2FkZd M9yWjcpaJz+y7GiR3+TwVr3km3Gq/qXYhiq3yOBL+p90W/w5GvsZCa26IZ/24tNKpdke CEog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="kR/E8OXT"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a17090a410700b0025be6419478si1223395pjf.92.2023.07.27.04.21.40; Thu, 27 Jul 2023 04:21:52 -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=@gmail.com header.s=20221208 header.b="kR/E8OXT"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233913AbjG0Kan (ORCPT + 99 others); Thu, 27 Jul 2023 06:30:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233998AbjG0KaQ (ORCPT ); Thu, 27 Jul 2023 06:30:16 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09D501984; Thu, 27 Jul 2023 03:30:01 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-d167393b95aso2880069276.0; Thu, 27 Jul 2023 03:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690453800; x=1691058600; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=omUaDYixzWjtTMpLHRqhT6EXYqbxVHZ/m0JLSVt+zRU=; b=kR/E8OXTGyuAcMVnK2KQrLklJTZJIbjeBJSeT2sIhGPM65Oruur9kofklO6ietHDy9 iN+Yk3uFFi0DCH5b+KIEtuBcPluVBtavpypaR5WD07CSqNhopnv+R23ky6tSh9IjXGJk GzdeqRWRPgntqPs3w/iwM7pGLzDbKoIc/aZkfpT2kgbAlhsGaHHBFI9ifZTJ75RImlBN m18KEttAN2mbFemlm21ARI+oQPZWhQ5ZKjtL1LwA/zUs5OtenG40a77AVnpCBMgIji09 cexZ5ek/pfpL8k5LTc7yy93lENk2O4UsiIb8Ws8buCdDhR4wb5xCwrRekry+fPBuluvl CgJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690453800; x=1691058600; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=omUaDYixzWjtTMpLHRqhT6EXYqbxVHZ/m0JLSVt+zRU=; b=Nu8Cnj1AU3YMdobcxa6j38XTBGUDdHZm7Ky9rG3bDO6Bpsc5YvUwy4Ls4JKoI0vE6p fDRcYuQBDmF1ol3FOqfI90Sogn5jarlnblz6QRZXQpjzDD5W+OmymYPd8yXvWZko/99u VrwsIC/nMpSmNo8Xab1qUjBS+oIaGidWw90Vj1kfg+DGTRLindzQd33933aP8lyqXJG0 DpXdeYo0nCkTUSEE2HuiuyW6dltaAnJ/VnE27ZuIhN6K3byMWznT2jBaN3wmlZOjYJsA Z00EgGMUVC75B0bGE45zLiKc9SWm4nE7tnnh7h1Gl6at2Uw1xhkFlYYIXIQEkNLmTdKD 8p0g== X-Gm-Message-State: ABy/qLbE5I+ILduGkww569LqrERsogemz2UFR91B88us+mQ8g+lkSqf3 g7cn8Tog7LvzodQZUyykbJGa4M+vux4fv1nTERE= X-Received: by 2002:a25:3617:0:b0:d1f:8809:ffa1 with SMTP id d23-20020a253617000000b00d1f8809ffa1mr2701868yba.27.1690453800151; Thu, 27 Jul 2023 03:30:00 -0700 (PDT) MIME-Version: 1.0 References: <20230627183629.26571-1-nj.shetty@samsung.com> <20230627183629.26571-3-nj.shetty@samsung.com> <20230720074256.GA5042@lst.de> In-Reply-To: <20230720074256.GA5042@lst.de> From: Nitesh Shetty Date: Thu, 27 Jul 2023 15:59:49 +0530 Message-ID: Subject: Re: [PATCH v13 2/9] block: Add copy offload support infrastructure To: Christoph Hellwig Cc: Nitesh Shetty , Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , 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, ming.lei@redhat.com, dlemoal@kernel.org, gost.dev@samsung.com, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Thu, Jul 20, 2023 at 1:12=E2=80=AFPM Christoph Hellwig wrot= e: > > Suggested-by: Christoph Hellwig > > Hmm, I'm not sure I suggested adding copy offload.. > We meant for request based design, we will remove it. > > static inline unsigned int blk_rq_get_max_segments(struct request *rq) > > { > > if (req_op(rq) =3D=3D REQ_OP_DISCARD) > > @@ -303,6 +310,8 @@ static inline bool bio_may_exceed_limits(struct bio= *bio, > > break; > > } > > > > + if (unlikely(op_is_copy(bio->bi_opf))) > > + return false; > > This looks wrong to me. I think the copy ops need to be added to the > switch statement above as they have non-trivial splitting decisions. > Or at least should have those as we're missing the code to split > copy commands right now. > Agreed, copy will have non-trivial splitting decisions. But, I couldn't think of scenarios where this could happen, as we check for queue limits before issuing a copy. Do you see scenarios where split could happen for copy here. Acked for all other review comments. Thank you, Nitesh Shetty