Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp602215rwr; Wed, 3 May 2023 03:36:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79ohVAl+Lo5zVB88NtEgD0MK8tT4OO/mEFJ0XwP3u6/lqi56gDlSytKesGA1kqK7O9CGlL X-Received: by 2002:a17:90a:680f:b0:24d:e929:56cf with SMTP id p15-20020a17090a680f00b0024de92956cfmr12031123pjj.39.1683110176555; Wed, 03 May 2023 03:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683110176; cv=none; d=google.com; s=arc-20160816; b=Yu1qxsq0FooWjN6Kbbn+ws+5sJufgAAyNwq54s2IrTr4wKKx7ornu94NFjcTTB5WKw mKxO7QRiLtQKecXGETD3XG1snw+iINxua91YYrGt/XVAHyiUq3uXUJspDBAyKE/qQ+dz 6nQecP/vJ6FoYW1NcwgAhqsYa0EytBhOGypgIaqm3tPv2DuuxdubO0nW2V1LwF48MGzG zIRI5cDsKO3MOhyEoITLrAkQ9Gk5UaJm9cD++nIag9WmLZmpyeo8S4VOTzOawnXop1Lb imTWSF+Kw+olfwjFDF9w+r5vUKBsD+52Ue/YpVCaCO+JfMf7Qc4lTIAXZGKn1GKm9waR q8pA== 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=z1Pr/BMubVK5gm0MNy0PUzgA5DYmQXK+i/O5omA92XA=; b=rhh40yWTfNFJOYIrC6gTclwubnBHi3awZitCvjq4IUEvZG4V40Z+LbUHdHzXw6GzoT OgkQsWdugTx+W47feyBc/uGhdTgw0GThGED2BQF1UZNQJCGKnZFYDzxM6k/osJdDYdhE W4ylzxjQoEQLrMfe8w7ZmHIgenCyv5cyjuG1ZsWuz1nNct14F9BOKw0pzRP/HcNNCja8 pvh2JEC2YPZZoaIwhh5jKhlbkqYbpt7+zQnZTI+OXdDvTDlWeU/CzHw9lJIxwFMQM5MB A9A/RQaOf58gYSVty3wKzf9Hx5PvXWMZdALZD4kiibGwBGyv99YXzj3pFsJKLEvM1lZo p9MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=DfghvSUU; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 126-20020a630284000000b0050bf22172d3si4347300pgc.490.2023.05.03.03.35.58; Wed, 03 May 2023 03:36:16 -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=DfghvSUU; 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 S229939AbjECK2Z (ORCPT + 99 others); Wed, 3 May 2023 06:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229765AbjECK2X (ORCPT ); Wed, 3 May 2023 06:28:23 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06BD10F3 for ; Wed, 3 May 2023 03:28:21 -0700 (PDT) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230503102820epoutp0130881227ee3bfab8d46b6d0f1f935703~bm1rYOfJB2902729027epoutp01V for ; Wed, 3 May 2023 10:28:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230503102820epoutp0130881227ee3bfab8d46b6d0f1f935703~bm1rYOfJB2902729027epoutp01V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683109700; bh=z1Pr/BMubVK5gm0MNy0PUzgA5DYmQXK+i/O5omA92XA=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=DfghvSUUIX54ioWeOM+ZO960qSwEM4DlGHKy0OxHqVyGAfRbtPzHFx2J97sZpjl8t y64Ej5j55frDtqnQjXxWq/WoEluvVlbA9hWPsMgppBpGanyxMUWkEwQyMY6+gADH7N JpaiuNbKN6dFO1sbpQavJyJ3xNP8E5Mh4vlaCPoY= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230503102819epcas2p3d5d48480285c6355b70b4be904d57435~bm1q5sKgY2240622406epcas2p35; Wed, 3 May 2023 10:28:19 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.90]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4QBCpC1Sy5z4x9Px; Wed, 3 May 2023 10:28:19 +0000 (GMT) X-AuditID: b6c32a45-465ff70000020cc1-47-64523743bffa Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 0C.12.03265.34732546; Wed, 3 May 2023 19:28:19 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH 15/15] block: blk-integrity: remove blk_rq_count_integrity_sg() Reply-To: j-young.choi@samsung.com Sender: Jinyoung CHOI From: Jinyoung CHOI To: Jinyoung CHOI , "axboe@kernel.dk" , "hch@lst.de" , "martin.petersen@oracle.com" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323@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: <20230503102818epcms2p8fe187efd29182c441c2670f890c8f9c1@epcms2p8> Date: Wed, 03 May 2023 19:28:18 +0900 X-CMS-MailID: 20230503102818epcms2p8fe187efd29182c441c2670f890c8f9c1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPKsWRmVeSWpSXmKPExsWy7bCmha6zeVCKwY59HBar7/azWbw8pGmx cvVRJove/q1sFntvaVtc3jWHzWL58X9MDuwel8+Weuy+2cDm8fHpLRaPvi2rGD0+b5ILYI3K tslITUxJLVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLxCdB1y8wBukFJoSwx pxQoFJBYXKykb2dTlF9akqqQkV9cYquUWpCSU2BeoFecmFtcmpeul5daYmVoYGBkClSYkJ1x dtEZxoJuoYqVC/vZGhhf8nUxcnJICJhI7P/zgLmLkYtDSGAHo8Tt7WeAHA4OXgFBib87hEFq hAUCJa68/cIKYgsJKEmcWzOLEaREWMBA4lavOUiYTUBP4ueSGWwgtojAaiaJ5uc1EON5JWa0 P2WBsKUlti/fyghicwr4STzecIsRIq4h8WNZLzOELSpxc/Vbdhj7/bH5UDUiEq33zkLVCEo8 +LkbKi4pcejQVzaQcyQE8iU2HAiECNdIvF1+AKpEX+Jax0awE3gFfCVm7HjABGKzCKhKnFxx Auo0F4m7e86CfcgsIC+x/e0ccCAwC2hKrN+lDzFdWeLILRaICj6JjsN/2WEebNj4Gyt7x7wn TBCtahKLmowgwjISXw/PZ5/AqDQLEcizkKydhbB2ASPzKkax1ILi3PTUYqMCQ3i8JufnbmIE p0Qt1x2Mk99+0DvEyMTBeIhRgoNZSYT3Q6FfihBvSmJlVWpRfnxRaU5q8SFGU6CHJzJLiSbn A5NyXkm8oYmlgYmZmaG5kamBuZI4r7TtyWQhgfTEktTs1NSC1CKYPiYOTqkGJmuVqChxF3Up 9/gp9lssKoJiL2bLKDXNNnonfX5Og8x9s1qzYi79DZkucTKaSl+Wn5/od2FWecyqhfHXGP9t i3rYcVj1S0xr3DzJdxyqPd0vVUr+v/RiC1DY0TAze9XJSx/06yUPJjk863k3cUJGyYN/e4vO J1zImeeXtFP5tbfPS/e5M797Vf0snpBje1eym19qrmN6j/z+P1vTfS0/3+eumf1siwf3lP21 G/b/PnPd7/rSVTNbF9btTTvnrlzr99Duhl0UwyNrKb782YdYt8cVx4u4vlu518nPZ2EfQ0z6 w8otzeHmFUGXpN0PdN0+Pd9n85MrYr9+8desCdxVvbCz91n+LKMfrixrFfT2KrEUZyQaajEX FScCANZ+dCoSBAAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323 References: <20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323@epcms2p4> X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 blk_rq_nr_nr_integrity_segments() allows you to obtain the number of integrity. Therefore, blk_rq_count_integrity_sg() is no longer necessary. Cc: Christoph Hellwig Cc: Martin K. Petersen Signed-off-by: Jinyoung Choi --- block/blk-integrity.c | 39 ----------------------------------- include/linux/blk-integrity.h | 1 - 2 files changed, 40 deletions(-) diff --git a/block/blk-integrity.c b/block/blk-integrity.c index c50954652177..9bac2836c3ff 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -16,45 +16,6 @@ #include "blk.h" -/** - * blk_rq_count_integrity_sg - Count number of integrity scatterlist elements - * @q: request queue - * @bio: bio with integrity metadata attached - * - * Description: Returns the number of elements required in a - * scatterlist corresponding to the integrity metadata in a bio. - */ -int blk_rq_count_integrity_sg(struct request_queue *q, struct bio *bio) -{ - struct bio_vec iv, ivprv = { NULL }; - unsigned int segments = 0; - unsigned int seg_size = 0; - struct bvec_iter iter; - int prev = 0; - - bio_for_each_integrity_vec(iv, bio, iter) { - - if (prev) { - if (!biovec_phys_mergeable(q, &ivprv, &iv)) - goto new_segment; - if (seg_size + iv.bv_len > queue_max_segment_size(q)) - goto new_segment; - - seg_size += iv.bv_len; - } else { -new_segment: - segments++; - seg_size = iv.bv_len; - } - - prev = 1; - ivprv = iv; - } - - return segments; -} -EXPORT_SYMBOL(blk_rq_count_integrity_sg); - /** * blk_integrity_compare - Compare integrity profile of two disks * @gd1: Disk to compare diff --git a/include/linux/blk-integrity.h b/include/linux/blk-integrity.h index 45b9fde1fee1..a2a9d72e8fab 100644 --- a/include/linux/blk-integrity.h +++ b/include/linux/blk-integrity.h @@ -41,7 +41,6 @@ void blk_integrity_unregister(struct gendisk *); int blk_integrity_compare(struct gendisk *, struct gendisk *); int blk_rq_map_integrity_sg(struct request_queue *, struct bio *, struct scatterlist *); -int blk_rq_count_integrity_sg(struct request_queue *, struct bio *); static inline unsigned short blk_rq_nr_integrity_segments(struct request *rq) { -- 2.34.1