From patchwork Thu Apr 25 18:39:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kanchan Joshi X-Patchwork-Id: 13643645 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 ADF27149DFD for ; Thu, 25 Apr 2024 18:47:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714070825; cv=none; b=hvPD8GzfEjeEtjaOb/oCTsnMJFp99OkHnRqj/BKmkq79qPzKxOt3uOSpswEyfnRLAxnl5S5pgyHz4J35jieBDnrkxazFmKagE7xvkWvtS4zEI90GB6qTRcZlwAnRFknM5ccFxC9OgfPJSleciAkj6G6wUUkCdV6Vfk4riBaBKfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714070825; c=relaxed/simple; bh=0zuD9gszrxLOfK8HJKkiv8NVBsKlq8lupJk3KzBU8ok=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=RcfDC/vEoFI0nJc6O7wiZohwddcJ1zXEA+YquTRlIgCp1y/1SCzQkMkuM/B6kriih2gJOUUNzzm1Mt4AC5TPzL25zvE7jj1+q1D9uuMqBBcuBH3ntO1WLG8C41ndQZZCqeoBTopqUPy60RsWICrEvVe0Ju6wvRpe097w/V0BAqw= 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=bYhiEqIM; arc=none smtp.client-ip=203.254.224.24 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="bYhiEqIM" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240425184655epoutp01bc41d301f92aacab604621d23d08905c~JmlM4xcxq3260532605epoutp016 for ; Thu, 25 Apr 2024 18:46:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240425184655epoutp01bc41d301f92aacab604621d23d08905c~JmlM4xcxq3260532605epoutp016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1714070815; bh=aRbU1XKPvEeuwgaCiIvDBDmtfNhGzLeEHTExPWAIynM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bYhiEqIMOYIsKPXeih/PLo3m+M127zA+bL3KHmuFsV5BhkIi1kNU0KCCdIWqJzp+9 sy6VfdnpHMh/JT/4WEFJ6Vr12xjQUAUqwUBslTNO1rZn/TG9BWxWaatTDgyxCrJMQn rTUrACELQDNZo9/qN7n0tt5VidqTtQbbpFwcvCmw= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20240425184654epcas5p26f282413236cf15e1c992c985ea04949~JmlLwLGk_2738327383epcas5p2j; Thu, 25 Apr 2024 18:46:54 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.183]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4VQPwD390Rz4x9Pp; Thu, 25 Apr 2024 18:46:52 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id C9.E6.19431.C15AA266; Fri, 26 Apr 2024 03:46:52 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20240425184651epcas5p3404f2390d6cf05148eb96e1af093e7bc~JmlJoQfkR0824808248epcas5p3f; Thu, 25 Apr 2024 18:46:51 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240425184651epsmtrp245499ce6745e46d2ab1d88b3388c1748~JmlJnUZsw0238902389epsmtrp2b; Thu, 25 Apr 2024 18:46:51 +0000 (GMT) X-AuditID: b6c32a50-ccbff70000004be7-c0-662aa51c7ff8 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 8C.C2.19234.B15AA266; Fri, 26 Apr 2024 03:46:51 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240425184650epsmtip143df1e6819cfa539ae1ae7996e97cad2~JmlH25CSx3053530535epsmtip1s; Thu, 25 Apr 2024 18:46:49 +0000 (GMT) From: Kanchan Joshi To: axboe@kernel.dk, martin.petersen@oracle.com, kbusch@kernel.org, hch@lst.de, brauner@kernel.org Cc: asml.silence@gmail.com, dw@davidwei.uk, io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, gost.dev@samsung.com, Anuj Gupta , Kanchan Joshi Subject: [PATCH 01/10] block: set bip_vcnt correctly Date: Fri, 26 Apr 2024 00:09:34 +0530 Message-Id: <20240425183943.6319-2-joshi.k@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240425183943.6319-1-joshi.k@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: H4sIAAAAAAAAA02Sf0wTZxjH896d1ytbyVnYeNMswk6XIBvQjlKuC4hGQi7OLYDbPywGanvS hvZa+8PhTEaDAylkIMgQCugwOk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WqwLTzMKGa+ZE/zadNPc4naHw/sLchcVf1ooaDCncYX1p+JF ocIN3wsPeP53yPrsfLLSeNbD49uj9momhbz49V2JpTgj0VCLuag4EQD+boJzBAMAAA== X-CMS-MailID: 20240425184651epcas5p3404f2390d6cf05148eb96e1af093e7bc X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240425184651epcas5p3404f2390d6cf05148eb96e1af093e7bc References: <20240425183943.6319-1-joshi.k@samsung.com> From: Anuj Gupta 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 2e3e8e04961e..e3390424e6b5 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -254,6 +254,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); @@ -275,6 +276,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; }