From patchwork Wed Jun 26 10:06:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Gupta X-Patchwork-Id: 13712770 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7974B17F4E8 for ; Wed, 26 Jun 2024 11:42:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719402125; cv=none; b=UqONRAvDgFhOzXMJ5QRVhcc1S3JiPu2R477Y+zQTUwsM1zLg7RYG8bOkeuE8CDc2reaK8fFsMawmYj8fvmZVhkBKV+Hlxr/xt1nzfpINmwi/mJzLSfkUTE7Sd+cjNC0FoAmnopb2i5FNVgFwpmMjsjiCUdmZxpgoCzOEd1wHaaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719402125; c=relaxed/simple; bh=bDM2mzF+qYf4eY9qLWRjxBr8gqKFq4pksnmaibWnQtw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=HwnqjPZS132udkGB0yFlkNwYsfML4qVGRk+ASLzD4u+v4Olk6u86j7Tn0XP6zymkpBbHhhN0E9i9P1oBOHPA2dzBNrteRJgTPxkCWEZgN6uDIT/Sq9b/dokqqeQuORdTpAHbua4HXj8OTRrOk8EJLFziMjOGnqdWNfp5XwQhb3M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=gnq1+7sh; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="gnq1+7sh" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240626114200epoutp02d2c8d6c2504afdb0f250ae170d90ac23~cix54obkT0090100901epoutp02l for ; Wed, 26 Jun 2024 11:42:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240626114200epoutp02d2c8d6c2504afdb0f250ae170d90ac23~cix54obkT0090100901epoutp02l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1719402120; bh=CddwOBmVKHfCIekEQ0xwuipaf4radU9oHxoG3DHT28I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gnq1+7shfd+oITixvUjmZ4W3xtAcCtdITQSIMn2cv/PzwOBGxQI7IchYE1ObDxj+/ CmPQpsw9QMlv1GBnnkxn32tr45JZNf7ZPMmqxLA7nz+OE2pTyzOVcfvCz5HH//g+lA 0qYVtJO+is6uV8cTHY9MfB0JBTcTiW48Cgdc1KKw= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240626114200epcas5p3d0f26fedd94965b2a16a9a978e7d1d34~cix5anObS2803828038epcas5p3D; Wed, 26 Jun 2024 11:42:00 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.179]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4W8KYK6Zjkz4x9Pp; Wed, 26 Jun 2024 11:41:57 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 29.08.09989.58EFB766; Wed, 26 Jun 2024 20:41:57 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20240626101513epcas5p10b3f8470148abb10ce3edfb90814cd94~chmIrqYUZ0829808298epcas5p1f; Wed, 26 Jun 2024 10:15:13 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240626101513epsmtrp2eeaa7a869685d6ca50a408eaa6d5ffab~chmIq6IEq1237112371epsmtrp2N; Wed, 26 Jun 2024 10:15:13 +0000 (GMT) X-AuditID: b6c32a4a-bffff70000002705-25-667bfe853d33 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 7E.6B.29940.13AEB766; Wed, 26 Jun 2024 19:15:13 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240626101512epsmtip15b7099c4bf924e901811582bd44caed0~chmG6euMQ0147101471epsmtip1P; Wed, 26 Jun 2024 10:15:11 +0000 (GMT) From: Anuj Gupta To: asml.silence@gmail.com, mpatocka@redhat.com, axboe@kernel.dk, hch@lst.de, kbusch@kernel.org, martin.petersen@oracle.com Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, Anuj Gupta , Kanchan Joshi Subject: [PATCH v2 02/10] block: set bip_vcnt correctly Date: Wed, 26 Jun 2024 15:36:52 +0530 Message-Id: <20240626100700.3629-3-anuj20.g@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240626100700.3629-1-anuj20.g@samsung.com> Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKJsWRmVeSWpSXmKPExsWy7bCmpm7rv+o0g8nrjS2aJvxltpizahuj xeq7/WwWK1cfZbJ413qOxeLo/7dsFpMOXW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aD9vXKz03mSfZ8b/E yGFnzMKrc2bUczwzkkx49H9G1hMlluKMREMt5qLiRABZ/IQIAQMAAA== X-CMS-MailID: 20240626101513epcas5p10b3f8470148abb10ce3edfb90814cd94 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240626101513epcas5p10b3f8470148abb10ce3edfb90814cd94 References: <20240626100700.3629-1-anuj20.g@samsung.com> Set the bip_vcnt correctly in bio_integrity_init_user and bio_integrity_copy_user. If the bio gets split at a later point, this value is required to set the right bip_vcnt in the cloned bio. Signed-off-by: Anuj Gupta Signed-off-by: Kanchan Joshi Reviewed-by: Christoph Hellwig --- block/bio-integrity.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/bio-integrity.c b/block/bio-integrity.c index dab70370b2c7..af79d9fbf413 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -276,6 +276,7 @@ static int bio_integrity_copy_user(struct bio *bio, struct bio_vec *bvec, bip->bip_flags |= BIP_INTEGRITY_USER | BIP_COPY_USER; bip->bip_iter.bi_sector = seed; + bip->bip_vcnt = nr_vecs; return 0; free_bip: bio_integrity_free(bio); @@ -297,6 +298,7 @@ static int bio_integrity_init_user(struct bio *bio, struct bio_vec *bvec, bip->bip_flags |= BIP_INTEGRITY_USER; bip->bip_iter.bi_sector = seed; bip->bip_iter.bi_size = len; + bip->bip_vcnt = nr_vecs; return 0; }