Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1019193rwr; Wed, 3 May 2023 09:09:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VFSYJynalIibkYyGNA9xo9PljH2062rSlZhjKRPgtL9lorIRTdzLlG0Wx5O8vimSdOJhq X-Received: by 2002:a17:902:ec81:b0:1a6:6edd:d143 with SMTP id x1-20020a170902ec8100b001a66eddd143mr22614064plg.6.1683130150756; Wed, 03 May 2023 09:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683130150; cv=none; d=google.com; s=arc-20160816; b=xBhwXF6/hK4x69gkGs+La1RfuxfBUwrf5ehFHSOapm4BJiG7omKTGGNLr1UaoEkzWn zVjgmLxDsOdfYr/ek0Av+Co313bT6cZE1ZyB+p78LfiYBNKVGCrbcdpA4tyewTy+O/9Y 7+vazJlRLrG/t1TYH8IcHB7vomK0AjMamhxmhLpC/oAGPfs+/SpGeHqe8dPB6YipsZcM N4nXZ0Rcgm1nn1+PfrUKt76tormD21PkzBDzpJ+HPt0zxk+Jn9aGu6Uy/vyyTSmGkqjR IsljcCEIP4Pdb7Js+r4H+XEjien2P70kjghS1d73yTBIvn/9puPxmVVdoouW3PVHr9AQ J9+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fjPM5b8zxMLq7hDQv+zmxHCmYlR2ngRfGkhbifI0tcA=; b=BMdF4aDRCRoPxKnEz5EwWfcRrLhdPFMllcGTb5n0+I8pvO7Gh4f1WIfYy27jU6hbm9 +D9bbIULQblVmIno3thiyIYdXQZOLYeMF32mo7RJKy3OhPfNLy0FkWE7CYWdOGiU+0jQ 9zhFW98VjRQY9m26ZRU/DCgwx0z72l6lESgqz/+I87+cOtKgyhrh0FmfJUNCWzhc+8Cx N22dFJ8xlq3dkHsCNxUppwp4W8wev5OKaLb0hFDrpjaKnIpf7flm/7PDQdQOa+E3OHXk pTh4vi34QBJxc3Uo0iIsPodXm+OJaAkP5DaTeCfTCZGNXj/Obn8c8hdaqZLIUC3vJ1Y+ 3RBQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a1709026f0100b001a64b603189si30640649plk.100.2023.05.03.09.08.54; Wed, 03 May 2023 09:09:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbjECPzO (ORCPT + 99 others); Wed, 3 May 2023 11:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbjECPzK (ORCPT ); Wed, 3 May 2023 11:55:10 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4F7E6EB8; Wed, 3 May 2023 08:55:05 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 3E76E68AA6; Wed, 3 May 2023 17:55:02 +0200 (CEST) Date: Wed, 3 May 2023 17:55:01 +0200 From: "hch@lst.de" To: Jinyoung CHOI Cc: "axboe@kernel.dk" , "hch@lst.de" , "martin.petersen@oracle.com" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 02/15] block: blk-integiry: add helper functions for bio_integrity_add_page Message-ID: <20230503155501.GB31700@lst.de> References: <20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323@epcms2p4> <20230503100220epcms2p33e69fd7d5f04b305c621799792e8155f@epcms2p3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230503100220epcms2p33e69fd7d5f04b305c621799792e8155f@epcms2p3> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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 s/blk-integiry/blk-integrity/ in the subject. > +static inline bool bip_full(struct bio_integrity_payload *bip, unsigned int len) > +static bool bip_try_merge_hw_seg(struct request_queue *q, > + struct bio_integrity_payload *bip, > + struct page *page, unsigned int len, > + unsigned int offset, bool *same_page) ... but adding static functions without users will cause a compile error anyway, so I'd suggest to just merge it into the patch adding users. But I wonder if we really want to duplicate all this logic anyway. If we passed a bio_vec array, the vec count and an iter, we should be able to just share the logic with the bio data payload.