Message ID | 20230510085018epcms2p5a3830e37b13e9a6799298050abdc77dc@epcms2p5 |
---|---|
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 b10csp3466635vqo; Wed, 10 May 2023 01:55:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kbE4ggzaaa1msYZel/R38CfWy1oU48WqO4ARSTFVo3737tIQWaSZD8JZQwsURgbqRzlab X-Received: by 2002:a05:6a21:3401:b0:f6:4c16:f7fb with SMTP id yn1-20020a056a21340100b000f64c16f7fbmr17925171pzb.47.1683708946235; Wed, 10 May 2023 01:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683708946; cv=none; d=google.com; s=arc-20160816; b=j55CLxzt7r0bD4QUVLIgi6CHD1vxpoqRdyJ++2NvJFvHNFCIMrjloYIXUzNwk9J76E ZL84Fnsd/2puzWOpWURYFYxa+ZJgtC4F5LcQD18IJ3+FDdG4YaKxZk471phZTL4tak7i BLHCo+jxs/PrQ3v9oDjuk0CuWqxoRDCb51OHGYU4Ni31AFDuWhkvFnFPIB4eXieXD90K GmcDfDW893J4yrg0F8T4y1kZPjbPcQYTXV0iYGUFxyIvCBb7BEjzzTnn4yQrd+yRLW/B fUrdAUO6qgWp5bo8Y76NKkU+PQuFwJwwIaIFi20y3EsBD0jcpsuUre+7IIyzPdYCCoQt I2ZA== 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=2uIhNIvaUDqD62d3MZOJy319yIzbYqTLMuJPQ32qIts=; b=XfI+uM+vTPpFbDc54SV7VdYYGHz4kUK17I/BYRwGVB2HsK03MvEmbAUmwPWyA6DwXg UTZtul7dkMh3skF7rj2lxkV0+yU6Y7bwJtjvUXmYVBVsHl/nGW2iX5cMBphrw3GJHHh0 u41h92RKGO8ueGuaM/EP/wR5ydgtI5MfC9nJHo46WX8dDCocgNF729zuA+2nRMH6xzbw UlxrNe8Fo8UqUUXqo7jho1nRU9M0kyowIqeAkGz28U4/+gMAOpKSZDj1v/VnT51cM0ml TKO63O7Zdu4MRseqrv6Sw/p2q1aMhPn1RHTmAEWELNdL1SVMTy7kKi4nGzvz9nAagThL 3zsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HI58pAC3; 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 v202-20020a6361d3000000b0050bede17e7bsi3560214pgb.347.2023.05.10.01.55.31; Wed, 10 May 2023 01:55:46 -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=HI58pAC3; 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 S236754AbjEJIu0 (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Wed, 10 May 2023 04:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235899AbjEJIuX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 10 May 2023 04:50:23 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8FCE10C0 for <linux-kernel@vger.kernel.org>; Wed, 10 May 2023 01:50:21 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20230510085020epoutp048771002cb7c6498d50e1e50e9f6a6f16~dvBHIi8TV2618026180epoutp04b for <linux-kernel@vger.kernel.org>; Wed, 10 May 2023 08:50:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230510085020epoutp048771002cb7c6498d50e1e50e9f6a6f16~dvBHIi8TV2618026180epoutp04b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683708620; bh=2uIhNIvaUDqD62d3MZOJy319yIzbYqTLMuJPQ32qIts=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=HI58pAC3T92fLBNh14/TrCp6S4sYxewN8NaQ5IjE1qp9pRn8N1+ywN3qcn55q6IMh qt9P/uVbTOlqgcxAtCO1s1jq4DiK3zKnPG9nk34PpvAzXD4Pp7QWzoFp0lxWBGHhsl rxb5Xjo3dCPxplkaCmRi2SIuEHPmikRoQhX6deOw= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20230510085019epcas2p2a3e50c925ac64ea08544707ad1f82bc2~dvBGjVMiL2936129361epcas2p2G; Wed, 10 May 2023 08:50:19 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.100]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4QGTHv0bMRz4x9Pv; Wed, 10 May 2023 08:50:19 +0000 (GMT) X-AuditID: b6c32a47-c29ff70000002007-32-645b5acac020 Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id E0.95.08199.ACA5B546; Wed, 10 May 2023 17:50:19 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v2 03/14] block: bio-integrity: cleanup bio_integrity_prep 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: <20230510085018epcms2p5a3830e37b13e9a6799298050abdc77dc@epcms2p5> Date: Wed, 10 May 2023 17:50:18 +0900 X-CMS-MailID: 20230510085018epcms2p5a3830e37b13e9a6799298050abdc77dc 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+NgFtrGJsWRmVeSWpSXmKPExsWy7bCmqe7pqOgUg9tZFqvv9rNZvDykabFy 9VEmi97+rWwWi25sY7L423WPyWLSoWuMFk+vzmKy2HtL2+LyrjlsFsuP/2OyWPf6PYvF7x9z 2Bx4Pc7f28jisXmFlsfls6Uem1Z1snlMWHSA0WP3z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yfzqvWlEktxRqKhFnNR cSIAP0C7YEkEAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684 References: <20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p1> <CGME20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p5> 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?1765496792039253785?= X-GMAIL-MSGID: =?utf-8?q?1765496792039253785?= |
Series |
Change the integrity configuration method in block
|
|
Commit Message
Jinyoung Choi
May 10, 2023, 8:50 a.m. UTC
If a problem occurs in the process of creating an integrity payload, the status of bio is always BLK_STS_RESOURCE. Cc: Christoph Hellwig <hch@lst.de> Cc: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com> --- block/bio-integrity.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
Comments
I find these "block: bio-integrity:" very unreadable. It seems like
a lot of commits just use block, which looks neater to me. The same
also applies to many of the other patches.
The patch itself looks good to me:
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 20444ec447cb..c49deed67bb2 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -245,7 +245,6 @@ bool bio_integrity_prep(struct bio *bio) unsigned int len, nr_pages; unsigned int bytes, offset, i; unsigned int intervals; - blk_status_t status; if (!bi) return true; @@ -274,7 +273,6 @@ bool bio_integrity_prep(struct bio *bio) /* Allocate kernel buffer for protection data */ len = intervals * bi->tuple_size; buf = kmalloc(len, GFP_NOIO); - status = BLK_STS_RESOURCE; if (unlikely(buf == NULL)) { printk(KERN_ERR "could not allocate integrity buffer\n"); goto err_end_io; @@ -289,7 +287,6 @@ bool bio_integrity_prep(struct bio *bio) if (IS_ERR(bip)) { printk(KERN_ERR "could not allocate data integrity bioset\n"); kfree(buf); - status = BLK_STS_RESOURCE; goto err_end_io; } @@ -313,7 +310,6 @@ bool bio_integrity_prep(struct bio *bio) if (bio_integrity_add_page(bio, virt_to_page(buf), bytes, offset) < bytes) { printk(KERN_ERR "could not attach integrity payload\n"); - status = BLK_STS_RESOURCE; goto err_end_io; } @@ -332,10 +328,9 @@ bool bio_integrity_prep(struct bio *bio) return true; err_end_io: - bio->bi_status = status; + bio->bi_status = BLK_STS_RESOURCE; bio_endio(bio); return false; - } EXPORT_SYMBOL(bio_integrity_prep);