From patchwork Wed May 3 10:10:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinyoung Choi X-Patchwork-Id: 13230011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDFB6C77B75 for ; Wed, 3 May 2023 10:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbjECKKx (ORCPT ); Wed, 3 May 2023 06:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbjECKKx (ORCPT ); Wed, 3 May 2023 06:10:53 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8464E73 for ; Wed, 3 May 2023 03:10:51 -0700 (PDT) Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230503101049epoutp026d724c4a80d91327676b45abad256e3f~bmmZLUq6q2403724037epoutp02H for ; Wed, 3 May 2023 10:10:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230503101049epoutp026d724c4a80d91327676b45abad256e3f~bmmZLUq6q2403724037epoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683108649; bh=ZtBNUgN0/grPa2YZpBQ/+703+N7AXHalnFNdUd9CK2g=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=UnPjeASTTFYc230ki1CKes37Bp3ntuFLpyMO/8uEk/BhWG88f5yqCVE4Raafe95VY QWr2IzHZ42/su6wTa6IUr15vn1tWu7r5B/7wluT/nxqUWMnv9ptlzyijMEvPJ9jOaT gVjKkUJOzX3YBZg992GYZPQ+NFDesK3IssYAcAqo= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230503101049epcas2p38f6d0fb534262f57214878ba4a6ae640~bmmY8uVtU2866128661epcas2p3e; Wed, 3 May 2023 10:10:49 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.88]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4QBCQ10n2Zz4x9Pw; Wed, 3 May 2023 10:10:49 +0000 (GMT) X-AuditID: b6c32a45-6d1fd70000020cc1-29-6452332814ef Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id B1.7D.03265.82332546; Wed, 3 May 2023 19:10:49 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH 05/15] block: fix not to apply bip information in blk_rq_bio_prep() 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: <20230503101048epcms2p61d61df1431955d9517c9939999ee3478@epcms2p6> Date: Wed, 03 May 2023 19:10:48 +0900 X-CMS-MailID: 20230503101048epcms2p61d61df1431955d9517c9939999ee3478 X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDKsWRmVeSWpSXmKPExsWy7bCmma6mcVCKwd1pjBar7/azWbw8pGmx cvVRJove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PYnr3/odXOm0YbfS9M0n0xUe+uw43muqd5J+PObRDbosRSnJFoqMVcVJwI AOw3ppIPBAAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323 References: <20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323@epcms2p4> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org When a request is initialized through the bio, bio's integrity information is not reflected in the request. Cc: Christoph Hellwig Cc: Martin K. Petersen Signed-off-by: Jinyoung Choi --- include/linux/blk-mq.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 1dacb2c81fdd..cdb95e090919 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -961,6 +961,11 @@ static inline void blk_rq_bio_prep(struct request *rq, struct bio *bio, rq->__data_len = bio->bi_iter.bi_size; rq->bio = rq->biotail = bio; rq->ioprio = bio_prio(bio); + + if (bio_integrity(bio)) { + rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt; + rq->cmd_flags |= REQ_INTEGRITY; + } } void blk_mq_hctx_set_fq_lock_class(struct blk_mq_hw_ctx *hctx,