From patchwork Thu Aug 3 02:48:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinyoung Choi X-Patchwork-Id: 13339180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6BDBC001DE for ; Thu, 3 Aug 2023 02:48:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbjHCCse (ORCPT ); Wed, 2 Aug 2023 22:48:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232883AbjHCCsd (ORCPT ); Wed, 2 Aug 2023 22:48:33 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDD47103 for ; Wed, 2 Aug 2023 19:48:31 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230803024829epoutp028a5e6c104eab3e182b313a5391f85ac6~3v6cwowyJ2226522265epoutp023 for ; Thu, 3 Aug 2023 02:48:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230803024829epoutp028a5e6c104eab3e182b313a5391f85ac6~3v6cwowyJ2226522265epoutp023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1691030909; bh=CwBsuvROgaXCJ8AMDL4SdXVgyJ0v6aiqhJAaPpU3dPk=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=G7CQKH3gIpIIWY7zdwYmI1MuoQOnskpH802WAnQjJsZK1J4fOJ30Y5vhe9p5T8bTm E1+xrwTZUH2BtKsG222bBjbEuivyO7I7MSDII5dgAP+qVr3/8VUu5WiW1zdCKTZGMg ggxKvriatT+jiwVutJ3GnUu95AnLCXRA5kxK4oxo= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230803024829epcas2p34e6b1542e6e1e5849517c7ca28ab2287~3v6cOK3eI2760627606epcas2p36; Thu, 3 Aug 2023 02:48:29 +0000 (GMT) Received: from epsmgec2p1.samsung.com (unknown [182.195.36.97]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4RGYF85ZKbz4x9Pv; Thu, 3 Aug 2023 02:48:28 +0000 (GMT) X-AuditID: b6c32a43-84dfa7000000c342-61-64cb157c45d9 Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmgec2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 9D.23.49986.C751BC46; Thu, 3 Aug 2023 11:48:28 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v3 1/4] block: make bvec_try_merge_hw_page() non-static Reply-To: j-young.choi@samsung.com Sender: Jinyoung Choi From: Jinyoung Choi To: Christoph Hellwig , "axboe@kernel.dk" , "kbusch@kernel.org" , "chaitanya.kulkarni@wdc.com" , "sagi@grimberg.me" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "martin.petersen@oracle.com" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20230803024656epcms2p4da6defb8e1e9b050fe2fbd52cb2e9524@epcms2p4> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20230803024827epcms2p838d9e9131492c86a159fff25d195658f@epcms2p8> Date: Thu, 03 Aug 2023 11:48:27 +0900 X-CMS-MailID: 20230803024827epcms2p838d9e9131492c86a159fff25d195658f X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H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Zflvaz XSnHty9tuuyVNmdhyfTVdVkrDJr3trevqLbW/13ye2/cxtvNAskdM3u5tefz+VySTPrL4HLy fcTJb63F9+s+TfksdqOMx9ZVZvuu+yVVN7hXfl9e1s0w/VmiYqNp+/uolniFotLFtX5fmxUC uGwPH2pZuaysO0hOiaU4I9FQi7moOBEA51Mc+yoEAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230803024656epcms2p4da6defb8e1e9b050fe2fbd52cb2e9524 References: <20230803024656epcms2p4da6defb8e1e9b050fe2fbd52cb2e9524@epcms2p4> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org This will be used for multi-page configuration for integrity payload. Cc: Christoph Hellwig Cc: Martin K. Petersen Reviewed-by: Christoph Hellwig Signed-off-by: Jinyoung Choi --- block/bio.c | 2 +- block/blk.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/block/bio.c b/block/bio.c index c92dda962449..8d1533af7c60 100644 --- a/block/bio.c +++ b/block/bio.c @@ -934,7 +934,7 @@ static bool bvec_try_merge_page(struct bio_vec *bv, struct page *page, * size limit. This is not for normal read/write bios, but for passthrough * or Zone Append operations that we can't split. */ -static bool bvec_try_merge_hw_page(struct request_queue *q, struct bio_vec *bv, +bool bvec_try_merge_hw_page(struct request_queue *q, struct bio_vec *bv, struct page *page, unsigned len, unsigned offset, bool *same_page) { diff --git a/block/blk.h b/block/blk.h index 686712e13835..9d22ec3a53bc 100644 --- a/block/blk.h +++ b/block/blk.h @@ -75,6 +75,10 @@ struct bio_vec *bvec_alloc(mempool_t *pool, unsigned short *nr_vecs, gfp_t gfp_mask); void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs); +bool bvec_try_merge_hw_page(struct request_queue *q, struct bio_vec *bv, + struct page *page, unsigned len, unsigned offset, + bool *same_page); + static inline bool biovec_phys_mergeable(struct request_queue *q, struct bio_vec *vec1, struct bio_vec *vec2) {