From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (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 A489C19ABAB for ; Thu, 28 Nov 2024 11:45:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732794349; cv=none; b=b/cRc+jA0Qr8DoRxcUAavts3P6vhEWIh5n0PoQlhJVrmut5GHbi52J9Tqu84FkmezRl4Zqqh9pOAGrBRTrfi/DmJHROsMpDW0LKuWgDKcGzi/LIOuIQA7genzB+BPonNPLgSVkeN2BcM0XTs1kgmN+qNdcWzhGfMIyGfLwMlDsA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732794349; c=relaxed/simple; bh=z3oZCEUpNWP6ssVVNnvaEMGwTgZ5HxAO2xsIC7OVOu8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=dHxt80l4oG3rFSXwYtnttsheKL5IU0s8mRE+PHoCezenIEITzCZDxBScv2pLH0aO1gTohvu/ASTih6EZPLt4edGogNkAlLurKMzA5f9Dvciy+wB89ssWJ5l8sT+CCV3V5B09UxcFmFDbP23Mz0K2D/GxCiC02yizOm/xdHRcl0I= 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=Ve7TH4UT; arc=none smtp.client-ip=203.254.224.33 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="Ve7TH4UT" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20241128114545epoutp03867dc385adffed92a4c82e290d94fa40~MH0bSqcLQ3191131911epoutp03G for ; Thu, 28 Nov 2024 11:45:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20241128114545epoutp03867dc385adffed92a4c82e290d94fa40~MH0bSqcLQ3191131911epoutp03G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1732794345; bh=n6LNHR2UxOEOGCqUSfrJ4D/dcAXYHqklNM5hsVN/lLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ve7TH4UTrjaoxzxaVyMJPYLKmL3vANY90GJjHN+VnY21CbYuMJrOdMJegkLXxCz78 bT852QMNgL9IvFwKsR4cPeX6OCa0jPz5njFOjVb0Q09Pw1/v/S0UD/3nNcQcMORfFo Xc5AF2u9oz9dV4iU1+xJcpUmaThhDslPikwBw/Gg= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20241128114545epcas5p315c08a232c61583b6ce602548eb40a87~MH0avYkSY0770307703epcas5p3G; Thu, 28 Nov 2024 11:45:45 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.177]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4XzZJ737Jcz4x9Pq; Thu, 28 Nov 2024 11:45:43 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B2.5F.20052.7E758476; Thu, 28 Nov 2024 20:45:43 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20241128113056epcas5p2c9278736c88c646e6f3c7480ffb2211f~MHneuWfpJ0944809448epcas5p2b; Thu, 28 Nov 2024 11:30:56 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20241128113055epsmtrp125914b31a9851fd5bfa2fbb23d18fb34~MHnetfzXq0051900519epsmtrp1w; Thu, 28 Nov 2024 11:30:55 +0000 (GMT) X-AuditID: b6c32a49-3fffd70000004e54-5f-674857e7096b Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 50.58.33707.F6458476; Thu, 28 Nov 2024 20:30:55 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20241128113053epsmtip25c3e70b93be3b37eee03a79d53577f2a~MHnceONJ52429524295epsmtip2f; Thu, 28 Nov 2024 11:30:53 +0000 (GMT) From: Anuj Gupta To: axboe@kernel.dk, hch@lst.de, kbusch@kernel.org, martin.petersen@oracle.com, asml.silence@gmail.com, anuj1072538@gmail.com, brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-scsi@vger.kernel.org, vishak.g@samsung.com, linux-fsdevel@vger.kernel.org, Anuj Gupta Subject: [PATCH v11 01/10] block: define set of integrity flags to be inherited by cloned bip Date: Thu, 28 Nov 2024 16:52:31 +0530 Message-Id: <20241128112240.8867-2-anuj20.g@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241128112240.8867-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 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA01Tf0xTVxjlvvf6C9ftgS67ksG6Nw0oAVql9eJEjRB8brqRLBnLhEBDX1rS 0j77WodkyxoZiihUXZ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ges8n5 24HZoncEZobFndXbPPfXk6mSti4zvgRnOva/NU5jqN76Y89rJRmnb9GSbDXOIVfOhy/jaxZ0 KK95EPn09Ixwjd9nb++TXXuF+UxYqfO7+59nBPm+3xAlEPh0VXGc4SXH2Y6sp3R+C2oG1Cqx FGckGmoxFxUnAgALE1Q0HgMAAA== X-CMS-MailID: 20241128113056epcas5p2c9278736c88c646e6f3c7480ffb2211f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241128113056epcas5p2c9278736c88c646e6f3c7480ffb2211f References: <20241128112240.8867-1-anuj20.g@samsung.com> Introduce BIP_CLONE_FLAGS describing integrity flags that should be inherited in the cloned bip from the parent. Suggested-by: Christoph Hellwig Signed-off-by: Anuj Gupta Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Keith Busch --- block/bio-integrity.c | 2 +- include/linux/bio-integrity.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 2a4bd6611692..a448a25d13de 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -559,7 +559,7 @@ int bio_integrity_clone(struct bio *bio, struct bio *bio_src, bip->bip_vec = bip_src->bip_vec; bip->bip_iter = bip_src->bip_iter; - bip->bip_flags = bip_src->bip_flags & ~BIP_BLOCK_INTEGRITY; + bip->bip_flags = bip_src->bip_flags & BIP_CLONE_FLAGS; return 0; } diff --git a/include/linux/bio-integrity.h b/include/linux/bio-integrity.h index dbf0f74c1529..0f0cf10222e8 100644 --- a/include/linux/bio-integrity.h +++ b/include/linux/bio-integrity.h @@ -30,6 +30,9 @@ struct bio_integrity_payload { struct bio_vec bip_inline_vecs[];/* embedded bvec array */ }; +#define BIP_CLONE_FLAGS (BIP_MAPPED_INTEGRITY | BIP_CTRL_NOCHECK | \ + BIP_DISK_NOCHECK | BIP_IP_CHECKSUM) + #ifdef CONFIG_BLK_DEV_INTEGRITY #define bip_for_each_vec(bvl, bip, iter) \ -- 2.25.1