From patchwork Mon Jul 31 12:50:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinyoung Choi X-Patchwork-Id: 13334568 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 B030AC001DF for ; Mon, 31 Jul 2023 12:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231643AbjGaMuv (ORCPT ); Mon, 31 Jul 2023 08:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbjGaMuu (ORCPT ); Mon, 31 Jul 2023 08:50:50 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62E74B8 for ; Mon, 31 Jul 2023 05:50:49 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20230731125047epoutp04cb0192767eedeaab40966ad6fe93becc~29MeFvHeR0971609716epoutp04j for ; Mon, 31 Jul 2023 12:50:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230731125047epoutp04cb0192767eedeaab40966ad6fe93becc~29MeFvHeR0971609716epoutp04j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1690807847; bh=CwBsuvROgaXCJ8AMDL4SdXVgyJ0v6aiqhJAaPpU3dPk=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=V0+TFzuCvQYXsEv9SIAguGjh3vm7W16uYGpxfzu0WKXGjDyRFGMw0UODn88xADwvH qC4LBnHWIF3xopNNOojFVSHwUi43xwSxFniPehZJtsXYG6UGbQCd80gHzth45W+Fgs rJIxEvN6u9PEGwQplMQ6nMuj6KrqrU3othREKTqQ= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20230731125047epcas2p4e284dd7dd3652377a31d4e502b253998~29MdXVHY03085630856epcas2p4U; Mon, 31 Jul 2023 12:50:47 +0000 (GMT) Received: from epsmgec2p1.samsung.com (unknown [182.195.36.68]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4RDylV4LjCz4x9Pq; Mon, 31 Jul 2023 12:50:46 +0000 (GMT) X-AuditID: b6c32a43-2f3ff7000001d7ef-1e-64c7ae26d430 Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmgec2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 37.11.55279.62EA7C46; Mon, 31 Jul 2023 21:50:46 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v2 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: "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: <20230731124710epcms2p55b4d1a163b5ee6f15d96bf07817e12a5@epcms2p5> 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: <20230731125045epcms2p11a5566bc86fa448890c0af8fa14db307@epcms2p1> Date: Mon, 31 Jul 2023 21:50:45 +0900 X-CMS-MailID: 20230731125045epcms2p11a5566bc86fa448890c0af8fa14db307 X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgF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T PfWt/IrZy5KkpY/4JbdaPVNtrnIysGzuXnnaQneT7o1Tm1/K5pU55q6u23vKd8aHFn722pT4 2RtfdmTcObOOX0hU8+vMDeofE4WKTk7q9qq5VPnx3HQ9Pe/67Wran34tetTbWZfa+GHThY0q QiF8vtVKLMUZiYZazEXFiQBVmLl+IQQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230731124710epcms2p55b4d1a163b5ee6f15d96bf07817e12a5 References: <20230731124710epcms2p55b4d1a163b5ee6f15d96bf07817e12a5@epcms2p5> 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) {