Message ID | 20230510085307epcms2p2118fe232ab7e7707c0fc70d5ede6aa58@epcms2p2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3474664vqo; Wed, 10 May 2023 02:11:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Dvb4xEHmN/uwJ9doMs4nYg4s1sKbSQeQaqlAXF5Jn592lXrSYd2/+41Z/XgsJ2TkXIASJ X-Received: by 2002:a05:6a20:5498:b0:101:3112:c839 with SMTP id i24-20020a056a20549800b001013112c839mr6835814pzk.15.1683709868780; Wed, 10 May 2023 02:11:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683709868; cv=none; d=google.com; s=arc-20160816; b=diEUdQXzUToUWOWW24tjXMp9H8zP7DO3yxVAUGPoU2tvZyT7mW2M8G/vPO0o+jX04/ NB2XaZ4oLZxfn55UJ+FqTnO/Ei6ztFWRj4IR1qpHS+j603M6Kbquirxi3ZKyx4FB/xpw y+un3otorEDjuTpiskGQJPQYZ2Ie8ThloF/2tOivuUGM/kyqj9E3ep1p7nQ8dgeWDdWN LxtHEyhFa6eynIe7t9Qc84Wot0IBD3SoqjVN76KolLmL8qLFpu467ED9WV7j64hsIlxC 1tW0/4RSmdHZiZQH0cMxyp0V99p+rHyyScy4F8yK5ggMyUJNWi4H7WOMUOXcNPbKESwm GrPQ== 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=hAgsUYvwnAwGZ8MCXuf3w6+KGzCXW9Ae7hJz02geX9Y=; b=FVmhgIz4feSs7vqv+orClxIPU+sQjcAVgrDA9tv4NDBupnCs6M8AbdoxrtV3bj8hot ZI8lu3XhT4W8lWDdIRPUQkm2ouE4ZnU5X466jWMMkubgOwBSY4fFY0v2zfxtJ+yZrVRc T2N3UYfKo68yzmTlWRh8VDcWQUnBP3rp3fdy4JaXARBwnIj4SBuuhgCCGYqI0Z9qszYn 9Y4AsK5z0IjDbtJh2mhGp0Ai5tgS+cr2eUJitJHfwFDbcbEIx+8xyVeBblC+AayLfUAy Z7HEZLflS3cPUbJfBpEOrexPOBQJDemUujrmeOpwjdM+MrvWGvaLn5kgZetmmyv9TKVL DUHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=jR+Xf2AE; 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 k189-20020a6384c6000000b00502f0410410si3519659pgd.472.2023.05.10.02.10.56; Wed, 10 May 2023 02:11:08 -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=jR+Xf2AE; 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 S236729AbjEJIxp (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Wed, 10 May 2023 04:53:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236898AbjEJIxa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 10 May 2023 04:53:30 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0002783FF for <linux-kernel@vger.kernel.org>; Wed, 10 May 2023 01:53:10 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230510085309epoutp01ac7be1161f53ad4a179b7165bf69b673~dvDkpaouM1575315753epoutp01D for <linux-kernel@vger.kernel.org>; Wed, 10 May 2023 08:53:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230510085309epoutp01ac7be1161f53ad4a179b7165bf69b673~dvDkpaouM1575315753epoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683708789; bh=hAgsUYvwnAwGZ8MCXuf3w6+KGzCXW9Ae7hJz02geX9Y=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=jR+Xf2AEHZd8CzlaLwDcpQnCsA1+wjmvoIIaxRCHWrl9ELYKhHhXPdt/jUBrj/VVA /EMTwvMd6nGYlBf6IpsH036kDENRTDz/Tvg9aYhgMgKYmb/3FFkLEIsrOWkI46t1Cs 7raEp9pSxJVoH2uY8neNDeEi1Yium1YtfN5I64lk= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20230510085308epcas2p19f03621cc47872e5931aeeeb9463f545~dvDj-t8151264312643epcas2p1U; Wed, 10 May 2023 08:53:08 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.101]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4QGTM80VzXz4x9Q0; Wed, 10 May 2023 08:53:08 +0000 (GMT) X-AuditID: b6c32a45-6d1fd70000020cc1-4e-645b5b7392d8 Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 29.6A.03265.37B5B546; Wed, 10 May 2023 17:53:08 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v2 06/14] block: blk-merge: fix merging two requests in ll_merge_requests_fn Reply-To: j-young.choi@samsung.com Sender: Jinyoung CHOI <j-young.choi@samsung.com> From: Jinyoung CHOI <j-young.choi@samsung.com> To: Jinyoung CHOI <j-young.choi@samsung.com>, "axboe@kernel.dk" <axboe@kernel.dk>, "kbusch@kernel.org" <kbusch@kernel.org>, "hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>, "jejb@linux.ibm.com" <jejb@linux.ibm.com>, "martin.petersen@oracle.com" <martin.petersen@oracle.com>, "johannes.thumshirn@wdc.com" <johannes.thumshirn@wdc.com>, "kch@nvidia.com" <kch@nvidia.com>, "willy@infradead.org" <willy@infradead.org>, "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p1> 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: <20230510085307epcms2p2118fe232ab7e7707c0fc70d5ede6aa58@epcms2p2> Date: Wed, 10 May 2023 17:53:07 +0900 X-CMS-MailID: 20230510085307epcms2p2118fe232ab7e7707c0fc70d5ede6aa58 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+NgFtrJJsWRmVeSWpSXmKPExsWy7bCmhW5JdHSKwZbfjBar7/azWbw8pGmx cvVRJove/q1sFotubGOy+Nt1j8li0qFrjBZPr85isth7S9vi8q45bBbLj/9jslj3+j2Lxe8f c9gceD3O39vI4rF5hZbH5bOlH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Xm7ZY/W9/0M5/lPaDD9ltoaylzUYRrW8o0M96774rny6/iMvi/qF1oydv4bzVKLMUZ iYZazEXFiQAFrTqKTAQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684 References: <20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p1> <CGME20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p2> X-Spam-Status: No, score=-4.4 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765497759446109684?= X-GMAIL-MSGID: =?utf-8?q?1765497759446109684?= |
Series |
Change the integrity configuration method in block
|
|
Commit Message
Jinyoung Choi
May 10, 2023, 8:53 a.m. UTC
blk_integrity_merge_rq() merges integrity segment information of two
requests. However, it is only a condition check and does not perform the
actual integrity information update. So this was modified.
After it is called, the merge process of the requests may fail
due to other conditions. At this time, there is an error in the integrity
segment information of request. So the call location was also changed.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Fixes: 13f05c8d8e98 ("block/scsi: Provide a limit on the number of integrity segments")
Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
---
block/blk-integrity.c | 2 ++
block/blk-merge.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 03a85e1f6d2e..f97b7e8a6d4d 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -181,6 +181,8 @@ bool blk_integrity_merge_rq(struct request_queue *q, struct request *req, if (integrity_req_gap_back_merge(req, next->bio)) return false; + req->nr_integrity_segments += next->nr_integrity_segments; + return true; } diff --git a/block/blk-merge.c b/block/blk-merge.c index 8509f468d6d4..c6a0958e8df1 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -711,10 +711,11 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req, if (!blk_cgroup_mergeable(req, next->bio)) return 0; - if (blk_integrity_merge_rq(q, req, next) == false) + if (!bio_crypt_ctx_merge_rq(req, next)) return 0; - if (!bio_crypt_ctx_merge_rq(req, next)) + /* this will merge integrity segments */ + if (!blk_integrity_merge_rq(q, req, next)) return 0; /* Merge is OK... */