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: 128671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2011220vqg; Mon, 31 Jul 2023 06:21:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlHyCK1GzVnVddKuZUAydxDj+I4Z5Y31jGEQiZx5Xs4aa7w7HsCdqy4Rf2/6eLyKrb8wwiyN X-Received: by 2002:a17:903:258b:b0:1bc:6c8:cde3 with SMTP id jb11-20020a170903258b00b001bc06c8cde3mr4408741plb.57.1690809707484; Mon, 31 Jul 2023 06:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690809707; cv=none; d=google.com; s=arc-20160816; b=xJmFtpab0S1nG82bCdbyiUN7pB87nAyULzeLaXxTH6SNE8XIcFsX54E4Oiz4lI3RZ2 84l4zipawJnzfnsY1ta32169i0pa1wjw7HhsXphkzxDqQkROndIWhPEEc9znGVRW/wSY mFGT25k1VJ1XaoCEj5xAmSoM6bk3rRMkjG7Afu0FEXKhNI56Axr+4YilczEhwOR4cMBr 4d6RCe1lJgqTPVaN/6Q3AX+z5/E/q+FfFwJeCvvdLoSmKQ//TEG0pOYezg5lk11gGBgK +VXFLCBss8nHvfewLL/feZ6HgnshyG5WeMJVD9TIALvU7cWFQbybJIiu7XFR6EaZclSX Lvzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:to:from :sender:reply-to:subject:mime-version:dkim-signature:dkim-filter; bh=CwBsuvROgaXCJ8AMDL4SdXVgyJ0v6aiqhJAaPpU3dPk=; fh=uBbyI6SbCMOsjvChbSySV6O3eRPD6uLlYeSceMR+iCY=; b=OkNh3OSw2md9IZ+DiuGvb3rNnT2i2KG3qGJBDLP1YLiqLeHvyen7FXpYVsIZJfWBRC m/t5lDiSYHCkjqfAyAbqvWePz71WTuw1mU7XnhIYxfwIPZYG0s5OYeNobrgrCAI7CDRc 7CkEfjE+6mN0NOXg4gZNqJeKCQV8X+Knfuffaw+anbaJC6QTVkdYPmU85CzKtcW8YF7U i2eH4U4rsXsTNhcxBAIIngcrc44JtTYIduWOlIXTJ4QfFKUv/4L+PJpeZjnd0gZ3U+DY gTlj+J6hzwR3f3H7P6ZhocVSD+sSiaNA51g1Fsv8EXWrJ2GrIM85PrIbwHdPgRrwIxsy umsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=DE9H0E5J; 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=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y22-20020a17090264d600b001bbd452d974si7275881pli.554.2023.07.31.06.21.34; Mon, 31 Jul 2023 06:21:47 -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=@samsung.com header.s=mail20170921 header.b=DE9H0E5J; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231755AbjGaMuw (ORCPT + 99 others); Mon, 31 Jul 2023 08:50:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbjGaMuu (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 8A3D2E46 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 20230731125048epoutp04ec80a68c96dc8d93c1e4dae0864a0e1f~29MeQijLR0709407094epoutp04Z for ; Mon, 31 Jul 2023 12:50:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230731125048epoutp04ec80a68c96dc8d93c1e4dae0864a0e1f~29MeQijLR0709407094epoutp04Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1690807848; bh=CwBsuvROgaXCJ8AMDL4SdXVgyJ0v6aiqhJAaPpU3dPk=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=DE9H0E5JafS26+L9dYeozhjXTmc+zDkfi6KxCGUjyUNHwdEMPImXqs3XCyjuJJZIR BBbxpS2/ZPtp/vmSR1egMZadD+aFeZuT4iH4erqQPeyR3MxSBO/cI9a1WDdHpqGkjU tbAF9izOSRHDoMY2VAIGUG/b9qt9ku7ypmx7WTcs= 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+NgFupjk+LIzCtJLcpLzFFi42LZdljTXFdt3fEUg+e9ihar7/azWcy6/ZrF 4uUhTYtJh64xWuy9pW1xedccNovlx/8xWax7/Z7FgcPj/L2NLB6Xz5Z6bFrVyebx8ektFo++ LasYPT5vkvNoP9DNFMAelW2TkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ib aqvk4hOg65aZA3SSkkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafAvECvODG3uDQv XS8vtcTK0MDAyBSoMCE7Y9MO74Ienortb86yNzB2c3UxcnJICJhIzJjxjrGLkYtDSGAHo8TE H/1sXYwcHLwCghJ/dwiD1AgLuEtMWPeRBcQWElCSOLdmFiNE3ECi5XYbWJxNQE9ix/Pd7CBz RAQ+M0lc/vGBFWIBr8SM9qcsELa0xPblW8GaOQX8JKZef8sEEdeQ+LGslxnCFpW4ufotO4z9 /th8RghbRKL13lmoGkGJBz93Q8UlJQ4d+gp2s4RAvsSGA4EQ4RqJtl/vocr1Ja51bAQ7gVfA F6jkFxNIOYuAqsSMyTkQJS4SH3efAbuYWUBeYvvbOcwgJcwCmhLrd+lDDFeWOHKLBaKCT6Lj 8F92mP8aNv7Gyt4x7wkTRKuaxKImI4iwjMTXw/PZJzAqzUKE8iwka2chrF3AyLyKUSy1oDg3 PTXZqMAQHq/J+bmbGMEJU8t5B+OV+f/0DjEycTAeYpTgYFYS4T0VcChFiDclsbIqtSg/vqg0 J7X4EKMp0L8TmaVEk/OBKTuvJN7QxNLAxMzM0NzI1MBcSZz3XuvcFCGB9MSS1OzU1ILUIpg+ Jg5OqQYmS3H9qCJvO9NJuy8KheperZfr731SbPJtBnNTmt+fs5frpaZPubC162G3T1v0TSnG vKurrLpKnjrw7K3jytLbMmnfPLWeSUenlWhMXixZOp3J4H7rE+b/gVcrMg2nNcwU/Wd9uFM8 88ZPkX1nTObsjJRinJ4x+5KNFOflWqHn0t9fzNzUmFq2/Zj1fI7oxZ+/hBfkVqZNczeMnCKT PfWt/IrZy5KkpY/4JbdaPVNtrnIysGzuXnnaQneT7o1Tm1/K5pU55q6u23vKd8aHFn722pT4 2RtfdmTcObOOX0hU8+vMDeofE4WKTk7q9qq5VPnx3HQ9Pe/67Wran34tetTbWZfa+GHThY0q QiF8vtVKLMUZiYZazEXFiQBVmLl+IQQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230731124710epcms2p55b4d1a163b5ee6f15d96bf07817e12a5 References: <20230731124710epcms2p55b4d1a163b5ee6f15d96bf07817e12a5@epcms2p5> 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,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772942479381513502 X-GMAIL-MSGID: 1772942479381513502 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) {