Message ID | 20230503101048epcms2p61d61df1431955d9517c9939999ee3478@epcms2p6 |
---|---|
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 b10csp1216054vqo; Wed, 3 May 2023 03:22:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4snafexIfQN9xknIR9WF/4/ASklCokgZwA1aAvfRbCUwymM5mLdxbhF5/2s1FPT6S7hu9O X-Received: by 2002:aa7:888a:0:b0:63b:64f7:45a0 with SMTP id z10-20020aa7888a000000b0063b64f745a0mr30471277pfe.12.1683109336380; Wed, 03 May 2023 03:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683109336; cv=none; d=google.com; s=arc-20160816; b=IR6da0KSVXprvEqB7uJ8rAPzQEm5F8l4i51atDF8E040zvBFTh7v+dCs9+NckRj69J iaGrGskLKWjiJK197+QYc3x9aySno1d0BQY5gbEGiXpe6IFa5ZXTUejwPwgSDZgzY1Ub uMH4WT8xEkrIW9La1tj1pcScNpJ5/ZN9cUf60bPHFRuF93fW+WzwuLyaHIZ9i403LceA D0nZ727FE1TQWNd+K/AsX1txjNl4AVP5bhAIys/XPEA0oUy+FODLdj9p0XeP4zGbtHCp Qsab+ROLfMs6bqFYRUVVM4zF+Aw9S8NqZSaVmFxxw1AG/1n6JnKhcy0C8YJzAV39A8iE 9EZA== 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=ZtBNUgN0/grPa2YZpBQ/+703+N7AXHalnFNdUd9CK2g=; b=rYrp2Cwh8+bac8Y5/Jp06JX0HVZvTSYsuZHGo+BMH5GlusYP9rc8+M97nMbK/WixfS jAdJGSxt77fBjbbsbM8rn0u06H5kHyVYncAbY2xOLlkk4RU9h0juam3C/ZRRaWUgThbT TfrwzoxHL9gMI29FLfK9RAUv6gsN3ykmrzMwkg1wPhSHjcdM/qJMmRCrlAgDSso02hUp ZjTk1qiXfdHG/NCEd4L8l7/I4UEEbiHeZb7aMcQmTBnoxoEtsMNlCjBJHYUCVjnLtdvI oVjF9xyZzhRRuJQ7QxfufHFguEmLL5a+g/T/f0StOc0GtRjADr3X9aPEPpNETMDq+0qA y0xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=QxLabi9g; 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 q5-20020aa78425000000b0063b88f52220si32638138pfn.144.2023.05.03.03.22.03; Wed, 03 May 2023 03:22: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=QxLabi9g; 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 S229802AbjECKKy (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Wed, 3 May 2023 06:10:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbjECKKx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 3 May 2023 06:10:53 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88CE21A5 for <linux-kernel@vger.kernel.org>; Wed, 3 May 2023 03:10:51 -0700 (PDT) Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230503101050epoutp0360221e9d08d67ce3904467d150dd43a9~bmmZWb3Oz2144121441epoutp03I for <linux-kernel@vger.kernel.org>; Wed, 3 May 2023 10:10:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230503101050epoutp0360221e9d08d67ce3904467d150dd43a9~bmmZWb3Oz2144121441epoutp03I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683108650; bh=ZtBNUgN0/grPa2YZpBQ/+703+N7AXHalnFNdUd9CK2g=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=QxLabi9gec1onP3dLuFgF6UlEGlHek9Kjr+0GdgDzqHAwyozTdSe/wX5pwdKH4fsU KQCZ3BeiJB4WqoR9N9yrHgq42r99F9YccebPTGb743seYBQox+/cFvTubDLIwx95Tx NKw/2ksDeK4zvBFmjdKKr8Tu6vXgTqfJBByPTPVI= 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 <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>, "hch@lst.de" <hch@lst.de>, "martin.petersen@oracle.com" <martin.petersen@oracle.com>, "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: <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 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+NgFvrDKsWRmVeSWpSXmKPExsWy7bCmma6mcVCKwd1pjBar7/azWbw8pGmx cvVRJove/q1sFntvaVtc3jWHzWL58X9MDuwel8+Weuy+2cDm8fHpLRaPvi2rGD0+b5ILYI3K tslITUxJLVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLxCdB1y8wBukFJoSwx pxQoFJBYXKykb2dTlF9akqqQkV9cYquUWpCSU2BeoFecmFtcmpeul5daYmVoYGBkClSYkJ3x secac8E09opfK7+xNjC2sXUxcnJICJhI/Ph3m6mLkYtDSGAHo8SPX99Zuxg5OHgFBCX+7hAG MYUFQiXmL9YHKRcSUJI4t2YWI0TYQOJWrzlImE1AT+LnkhlgE0UEVjNJND+vgZjOKzGj/SkL hC0tsX35VkYQm1PAT+LxhluMEHENiR/LepkhbFGJm6vfssPY74/Nh6oRkWi9dxaqRlDiwc/d UHFJiUOHvrKBnCMhkC+x4UAgRLhG4u3yA1Al+hLXOjayQPzkK7F/VRhImEVAVWL7vecsEJ0u EhOn+4CEmQXkJba/ncMMEmYW0JRYv0sfokJZ4sgtFogKPomOw3/ZYd5r2PgbK3vHvCdMEK1q EouajCDCMhJfD89nn8CoNAsRwrOQrJ2FsHYBI/MqRrHUguLc9NRiowJDeKQm5+duYgQnQy3X HYyT337QO8TIxMF4iFGCg1lJhPdDoV+KEG9KYmVValF+fFFpTmrxIUZToH8nMkuJJucD03Fe SbyhiaWBiZmZobmRqYG5kjivtO3JZCGB9MSS1OzU1ILUIpg+Jg5OqQYmg5DXb4uWaP5g+mFt uORVxePWBvufskpP+MInH/+87PC5G+uCjok72FS87eOc9PvmsX2mj/aVuh3jSHsdsvWs3bvP C031t7f9Ztj+82fLN6vGz5czDNlsti04ENbZ5K1w6qqTbNiK8LQ9H988vCmQ7eDt2PtjYtL2 1Lt/m5cEsT5xPXtbQNohIa8z+vnEVpumnNC2rY4+9tsfiigklHPIMrBszre7vSNn+amd2/xW xP9ZeVAg4NJiLn2ZVO4DnqkZsufEl0Q9CjW32f0x9dzOpdt3ZH72rlbqOVb8R2wef96hzlt+ y9j/OJtfkNJxfMPYnr3/odXOm0YbfS9M0n0xUe+uw43muqd5J+PObRDbosRSnJFoqMVcVJwI AOw3ppIPBAAA DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323 References: <20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323@epcms2p4> <CGME20230503094912epcms2p4bef206eab1c41a92eba2583a69c74323@epcms2p6> 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: <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?1764868055361541160?= X-GMAIL-MSGID: =?utf-8?q?1764868055361541160?= |
Series |
Change the integrity configuration method in block
|
|
Commit Message
Jinyoung Choi
May 3, 2023, 10:10 a.m. UTC
When a request is initialized through the bio, bio's integrity
information is not reflected in the request.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
---
include/linux/blk-mq.h | 5 +++++
1 file changed, 5 insertions(+)
Comments
Hi Jinyoung, kernel test robot noticed the following build errors: [auto build test ERROR on axboe-block/for-next] [also build test ERROR on mkp-scsi/for-next jejb-scsi/for-next linus/master v6.3 next-20230428] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jinyoung-CHOI/block-blk-integiry-add-helper-functions-for-bio_integrity_add_page/20230503-183015 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next patch link: https://lore.kernel.org/r/20230503101048epcms2p61d61df1431955d9517c9939999ee3478%40epcms2p6 patch subject: [PATCH 05/15] block: fix not to apply bip information in blk_rq_bio_prep() config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20230503/202305032008.NxgqlW9X-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/584edc6ae9cb23e8a778ee73d711b9143038a047 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jinyoung-CHOI/block-blk-integiry-add-helper-functions-for-bio_integrity_add_page/20230503-183015 git checkout 584edc6ae9cb23e8a778ee73d711b9143038a047 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=um SUBARCH=i386 olddefconfig make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash arch/um/drivers/ block/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202305032008.NxgqlW9X-lkp@intel.com/ All error/warnings (new ones prefixed by >>): In file included from arch/um/drivers/ubd_kern.c:27: include/linux/blk-mq.h: In function 'blk_rq_bio_prep': >> include/linux/blk-mq.h:972:19: error: 'struct request' has no member named 'nr_integrity_segments' 972 | rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt; | ^~ >> include/linux/blk-mq.h:972:63: warning: dereferencing 'void *' pointer 972 | rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt; | ^~ >> include/linux/blk-mq.h:972:63: error: request for member 'bip_vcnt' in something not a structure or union vim +972 include/linux/blk-mq.h 962 963 static inline void blk_rq_bio_prep(struct request *rq, struct bio *bio, 964 unsigned int nr_segs) 965 { 966 rq->nr_phys_segments = nr_segs; 967 rq->__data_len = bio->bi_iter.bi_size; 968 rq->bio = rq->biotail = bio; 969 rq->ioprio = bio_prio(bio); 970 971 if (bio_integrity(bio)) { > 972 rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt; 973 rq->cmd_flags |= REQ_INTEGRITY; 974 } 975 } 976
On Wed, May 03, 2023 at 07:10:48PM +0900, Jinyoung CHOI wrote: > When a request is initialized through the bio, bio's integrity > information is not reflected in the request. Uuh. This looks like a pretty grave bug unless I'm missing something. Can you: - submit this as a fix for 6.3 and -stable? - maybe find what broke this and add a fixes tag?
Hi Jinyoung, kernel test robot noticed the following build errors: [auto build test ERROR on axboe-block/for-next] [also build test ERROR on mkp-scsi/for-next jejb-scsi/for-next linus/master v6.3 next-20230428] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jinyoung-CHOI/block-blk-integiry-add-helper-functions-for-bio_integrity_add_page/20230503-183015 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next patch link: https://lore.kernel.org/r/20230503101048epcms2p61d61df1431955d9517c9939999ee3478%40epcms2p6 patch subject: [PATCH 05/15] block: fix not to apply bip information in blk_rq_bio_prep() config: riscv-randconfig-r042-20230503 (https://download.01.org/0day-ci/archive/20230504/202305040157.ZWiorthB-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project b1465cd49efcbc114a75220b153f5a055ce7911f) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/584edc6ae9cb23e8a778ee73d711b9143038a047 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jinyoung-CHOI/block-blk-integiry-add-helper-functions-for-bio_integrity_add_page/20230503-183015 git checkout 584edc6ae9cb23e8a778ee73d711b9143038a047 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash block/ drivers/mtd/ubi/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202305040157.ZWiorthB-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from block/bdev.c:15: In file included from include/linux/blk-integrity.h:5: >> include/linux/blk-mq.h:972:7: error: no member named 'nr_integrity_segments' in 'struct request' rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt; ~~ ^ >> include/linux/blk-mq.h:972:49: error: member reference base type 'void' is not a structure or union rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt; ~~~~~~~~~~~~~~~~~~^ ~~~~~~~~ 2 errors generated. vim +972 include/linux/blk-mq.h 962 963 static inline void blk_rq_bio_prep(struct request *rq, struct bio *bio, 964 unsigned int nr_segs) 965 { 966 rq->nr_phys_segments = nr_segs; 967 rq->__data_len = bio->bi_iter.bi_size; 968 rq->bio = rq->biotail = bio; 969 rq->ioprio = bio_prio(bio); 970 971 if (bio_integrity(bio)) { > 972 rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt; 973 rq->cmd_flags |= REQ_INTEGRITY; 974 } 975 } 976
Hi Jinyoung,
kernel test robot noticed the following build warnings:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on mkp-scsi/for-next jejb-scsi/for-next linus/master v6.3 next-20230428]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jinyoung-CHOI/block-blk-integiry-add-helper-functions-for-bio_integrity_add_page/20230503-183015
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link: https://lore.kernel.org/r/20230503101048epcms2p61d61df1431955d9517c9939999ee3478%40epcms2p6
patch subject: [PATCH 05/15] block: fix not to apply bip information in blk_rq_bio_prep()
config: hexagon-randconfig-r045-20230503 (https://download.01.org/0day-ci/archive/20230504/202305040206.hTkXRgzQ-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project b1465cd49efcbc114a75220b153f5a055ce7911f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/584edc6ae9cb23e8a778ee73d711b9143038a047
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jinyoung-CHOI/block-blk-integiry-add-helper-functions-for-bio_integrity_add_page/20230503-183015
git checkout 584edc6ae9cb23e8a778ee73d711b9143038a047
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/md/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305040206.hTkXRgzQ-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/md/md-bitmap.c:19:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/md/md-bitmap.c:19:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/md/md-bitmap.c:19:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:334:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
In file included from drivers/md/md-bitmap.c:31:
In file included from include/trace/events/block.h:8:
In file included from include/linux/blktrace_api.h:5:
include/linux/blk-mq.h:972:7: error: no member named 'nr_integrity_segments' in 'struct request'
rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt;
~~ ^
include/linux/blk-mq.h:972:49: error: member reference base type 'void' is not a structure or union
rq->nr_integrity_segments = bio_integrity(bio)->bip_vcnt;
~~~~~~~~~~~~~~~~~~^ ~~~~~~~~
>> drivers/md/md-bitmap.c:2564:34: warning: result of comparison of constant 4294967296 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
if (BITS_PER_LONG > 32 && csize >= (1ULL << (BITS_PER_BYTE *
~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
7 warnings and 2 errors generated.
vim +2564 drivers/md/md-bitmap.c
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2549
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2550 static ssize_t
fd01b88c75a718 drivers/md/bitmap.c NeilBrown 2011-10-11 2551 chunksize_store(struct mddev *mddev, const char *buf, size_t len)
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2552 {
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2553 /* Can only be changed when no bitmap is active */
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2554 int rv;
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2555 unsigned long csize;
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2556 if (mddev->bitmap)
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2557 return -EBUSY;
b29bebd66dbd49 drivers/md/bitmap.c Jingoo Han 2013-06-01 2558 rv = kstrtoul(buf, 10, &csize);
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2559 if (rv)
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2560 return rv;
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2561 if (csize < 512 ||
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2562 !is_power_of_2(csize))
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2563 return -EINVAL;
4555211190798b drivers/md/md-bitmap.c Florian-Ewald Mueller 2022-10-25 @2564 if (BITS_PER_LONG > 32 && csize >= (1ULL << (BITS_PER_BYTE *
4555211190798b drivers/md/md-bitmap.c Florian-Ewald Mueller 2022-10-25 2565 sizeof(((bitmap_super_t *)0)->chunksize))))
4555211190798b drivers/md/md-bitmap.c Florian-Ewald Mueller 2022-10-25 2566 return -EOVERFLOW;
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2567 mddev->bitmap_info.chunksize = csize;
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2568 return len;
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2569 }
43a705076e51c5 drivers/md/bitmap.c NeilBrown 2009-12-14 2570
>> When a request is initialized through the bio, bio's integrity >> information is not reflected in the request. > >Uuh. This looks like a pretty grave bug unless I'm missing something. >Can you: > > - submit this as a fix for 6.3 and -stable? > - maybe find what broke this and add a fixes tag? Thanks for your review. OK, I will check it and proceed. I didn't confirm that I turned off the config and compiled it. I will check it and upload in the next patch. sorry. Best Regards, Jinyoung.
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,