Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp598030rwr; Wed, 3 May 2023 03:31:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+ItRMQJVLW7K2hI6cLZzUOWmWPGMvE6FAJftPZXylcF1MksLFVJpjv02geD6DLsfdTWIa X-Received: by 2002:a05:6a21:9206:b0:fa:fc3f:32bd with SMTP id tl6-20020a056a21920600b000fafc3f32bdmr9352651pzb.28.1683109905463; Wed, 03 May 2023 03:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683109905; cv=none; d=google.com; s=arc-20160816; b=W19+9HGR23gmloPWI2pIxfkorWeWJBJsSIN6ouFrobXks/vNXsbMVGVAAHEd2RxEXv t+ddBdXsfUzzngzYHjmfNd3w/G49+839AYITERe41J/B0z5RQtz5CO7B5/hpfObG3W6v tzoYFAybBMoIzbVPut5HnivRPgZ7lbJz2JNZUD0/sb5dnHIMgAcwTAZR4lslhLfqeGvh FisdUQ1NOh8pQ5XJ6UAoPGqtJVYej8gW5IityOEDyGh21yCkMm4lxVVcOwPou2msIK5U r21CU5zEMMHHZ1FVy8+QTvWngtohgjHD/iGQsKbHdkjMpYGOT1uT4Jcmc8Y/rq7sNTS3 IzEA== 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=ZfhC85BvKxKIuur1CoeZsaWeIlAnBRlkMNE/o0TIGEU=; b=ZUjwyjHdHWMwFplMrper/VvETGy9Za75maelSFfNyZsKgr2b7I3JG4bSMyU3rdPPFh J4sACD1RHeAZpDf1U/XxqnU2FC4o7BMzFPLAvilZMfD9hoWNh9iB/CiDwNYgufy6jnXl MRaSTjUcQ/PI4HA8bpGkBZ2uYk2OmxdzlGvDvrP+1dAmsHcneYJDBrGoBMCXZBJ2LTJY ONiiSKOP9Cui1MM8TE9FHLr/stVJ35yaDIrbgCeEXui7ovDNcMyBZNTmF8D3AhQlHV5L Jy5QI3c02Ddp6PDckbB0EtnVgZBIO7HKvjm03x1hSgazvcPaQBYWbZ3veoJDJJjo+ZWl S+wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=jyNXa3IL; 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 r3-20020a632043000000b0050f736a8d3dsi33966402pgm.64.2023.05.03.03.31.25; Wed, 03 May 2023 03:31:45 -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=jyNXa3IL; 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 S229554AbjECKVv (ORCPT + 99 others); Wed, 3 May 2023 06:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbjECKVs (ORCPT ); Wed, 3 May 2023 06:21:48 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F36AE43 for ; Wed, 3 May 2023 03:21:47 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230503102145epoutp026c754d4c39cf36e2b10f4fa18193150a~bmv8GnkyF2929529295epoutp02f for ; Wed, 3 May 2023 10:21:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230503102145epoutp026c754d4c39cf36e2b10f4fa18193150a~bmv8GnkyF2929529295epoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683109305; bh=ZfhC85BvKxKIuur1CoeZsaWeIlAnBRlkMNE/o0TIGEU=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=jyNXa3IL3Wf63GZMeW5DyDIFhXPN7xFgXXLQCFE7ziOOvvmXjUK0EeWobmCywJ+Pd C4UHvEhtFAgX5XWt4dzB7Ls22Z9RkSUyw04KdEKCHVpRyGLyGsJ4P5b2G4HD6+i4a8 emHRb2n4pvR1aFR/66ZpzfOEbYi2B1CN5B8MDsC4= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230503102145epcas2p3ebef196678b9f539e5eef8d92b0100c6~bmv7h2NWR1582715827epcas2p3Z; Wed, 3 May 2023 10:21:45 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.89]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4QBCfc525gz4x9Pw; Wed, 3 May 2023 10:21:44 +0000 (GMT) X-AuditID: b6c32a45-6d1fd70000020cc1-fb-645235b806a6 Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id B3.70.03265.8B532546; Wed, 3 May 2023 19:21:44 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH 11/15] block: blk-integrity: change how to find the number of integrity of bio 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: <20230503102144epcms2p5ba957092cb811a6ed6cce92debe6e10c@epcms2p5> Date: Wed, 03 May 2023 19:21:44 +0900 X-CMS-MailID: 20230503102144epcms2p5ba957092cb811a6ed6cce92debe6e10c 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+NgFvrPKsWRmVeSWpSXmKPExsWy7bCmme4O06AUg9aVqhar7/azWbw8pGmx cvVRJove/q1sFntvaVtc3jWHzWL58X9MDuwel8+Weuy+2cDm8fHpLRaPvi2rGD0+b5ILYI3K tslITUxJLVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLxCdB1y8wBukFJoSwx pxQoFJBYXKykb2dTlF9akqqQkV9cYquUWpCSU2BeoFecmFtcmpeul5daYmVoYGBkClSYkJ1x dc511oINnBWdq28xNzA+Y+9i5OSQEDCR+DNzClMXIxeHkMAORokjp3oYuxg5OHgFBCX+7hAG qREWSJB43fKIFcQWElCSOLdmFliJsICBxK1ec5Awm4CexM8lM9hAbBGB1UwSzc9rIMbzSsxo f8oCYUtLbF++lRHE5hTwk3i84RYjRFxD4seyXmYIW1Ti5uq37DD2+2PzoWpEJFrvnYWqEZR4 8HM3VFxS4tChr2wg50gI5EtsOBAIEa6ReLv8AFSJvsS1jo1gJ/AK+ErMaVoNNp5FQFWi5/lS VogaF4nJM1vBbGYBeYntb+cwg4xkFtCUWL9LH2K6ssSRWywQFXwSHYf/ssM82LDxN1b2jnlP mCBa1SQWNRlBhGUkvh6ezz6BUWkWIpBnIVk7C2HtAkbmVYxiqQXFuempxUYFhvB4Tc7P3cQI TolarjsYJ7/9oHeIkYmD8RCjBAezkgjvh0K/FCHelMTKqtSi/Pii0pzU4kOMpkAPT2SWEk3O ByblvJJ4QxNLAxMzM0NzI1MDcyVxXmnbk8lCAumJJanZqakFqUUwfUwcnFINTB5sOidzuEU/ 7mE7UurH28RrvXwz92TxttpkC+9/rq+1RP2u5/4K/i9g31y+l/t479v357K65DZOltDMvW53 b02PHotc/zWHrgW9DGd1uZo4Lyo1H2tbv++uz3nP7Ss+9PN6bO//p/Hni17SwiPNVaJe1hwX 3Ru1ysqKJrt9lV63nGfCJpYVotEHZjY6xc09zb1g8c8dVku2aq/f9Hdvd/YNx97qE9rXO4q8 P0h873Hi9Cr8vLROK7e42mGLbEXTFkZT/TVmmV6eXnOq5y5nargXy3t3SmTTjdNXzR6dTSn/ 9mjJjIU3FCafsl7T4PxyDtfmvIMXC5xWab1733524/Od/6eo6PjtcCmZ2fcgVYmlOCPRUIu5 qDgRAJUtFKESBAAA 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, 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 The method of constructing a bip has been changed, the number of segments can be obtained through bip_vcnt. Cc: Christoph Hellwig Cc: Martin K. Petersen Signed-off-by: Jinyoung Choi --- block/blk-integrity.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/block/blk-integrity.c b/block/blk-integrity.c index f97b7e8a6d4d..64407b412947 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -217,7 +217,6 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req, struct bio *bio) { int nr_integrity_segs; - struct bio *next = bio->bi_next; if (blk_integrity_bypass_check(req, bio)) return true; @@ -225,9 +224,7 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req, if (!__blk_integrity_mergeable(q, req, bio)) return false; - bio->bi_next = NULL; - nr_integrity_segs = blk_rq_count_integrity_sg(q, bio); - bio->bi_next = next; + nr_integrity_segs = bio_integrity(bio)->bip_vcnt; if (req->nr_integrity_segments + nr_integrity_segs > q->limits.max_integrity_segments) -- 2.34.1