From patchwork Mon Nov 4 14:05:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Gupta X-Patchwork-Id: 840721 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (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 9E3261C3026 for ; Mon, 4 Nov 2024 15:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730735772; cv=none; b=kwQu8iGQCj5pQKvCrHJDQLFsFueh8Xcq+80urbEKlgauTab+ZhTllA49/VfA66tKeK74rfZppcK1MfTzETQQb20vHiXeyfz10HksOvGBj7HxiqjREPHhQAObzqX8p+pkTT4KTe3adodhRbmcrNMIRcPeaLToIcheZ4cn0KbMhag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730735772; c=relaxed/simple; bh=UFY5MN9pbhnVXin5x3CaTOeVR6EWJ0aWiPTyVYFaoBM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=eZaRRiO/qJHbTHITXu87oO98xGx0B2C0iy6erdFbdVqPIZU/Atwkr8xdhnCtqeTPeU0+sdfmfSBa5wYewJXUKNGE0tXrnIfPEB3h5GS9CtnpRXp1fXsgI0fD/7nGoSrVCppjC6i9scVskEhfdBi9FUIJpUX0upKzDjfr53NNm9Q= 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=p0X/MXIr; arc=none smtp.client-ip=203.254.224.34 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="p0X/MXIr" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20241104155608epoutp0400196e233885f710bad21c616d1dad5e~EzwMU2Pgb1250212502epoutp04E for ; Mon, 4 Nov 2024 15:56:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20241104155608epoutp0400196e233885f710bad21c616d1dad5e~EzwMU2Pgb1250212502epoutp04E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1730735768; bh=xceWim7FbQmDU7VlpPk+fRyrGFM+8wFLGLVO0uYGafc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p0X/MXIrS0WbqrNP9OszIJ6evitb34D3K4te4Z+CpLnkMrQHEr7M2x6zJEmHXe3gZ mRQA5aDlRbkgniB2gbv6jIa4FlG3IVl/StKEGWr3jlQ5ImEXlgfOn0urR4dNffjw0x CIe+ezfBqBHrTOg3rThJVU0s1O2diFx2iPhSvI/o= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20241104155608epcas5p2d0e7c7a247415b4d41800dd08e115c0a~EzwLwsJYX2426624266epcas5p2P; Mon, 4 Nov 2024 15:56:08 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.178]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Xhx064bjFz4x9Pv; Mon, 4 Nov 2024 15:56:06 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 40.DA.09800.69EE8276; Tue, 5 Nov 2024 00:56:06 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20241104141453epcas5p201e4aabfa7aa1f4af1cdf07228f8d4e7~EyXyb-HAs3052330523epcas5p2o; Mon, 4 Nov 2024 14:14:53 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20241104141453epsmtrp2550a6ccf6797c4f03750e856f4b9404b~EyXybFHiE1987119871epsmtrp2z; Mon, 4 Nov 2024 14:14:53 +0000 (GMT) X-AuditID: b6c32a4b-23fff70000002648-34-6728ee965683 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 99.68.35203.DD6D8276; Mon, 4 Nov 2024 23:14:53 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20241104141451epsmtip207668ca33be3d64f9fcd6ac19ddc4f3a~EyXv8Sdo23097430974epsmtip2m; Mon, 4 Nov 2024 14:14:51 +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 , Kanchan Joshi Subject: [PATCH v7 04/10] fs, iov_iter: define meta io descriptor Date: Mon, 4 Nov 2024 19:35:55 +0530 Message-Id: <20241104140601.12239-5-anuj20.g@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241104140601.12239-1-anuj20.g@samsung.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAA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ynsK2tZHH NWdYi3S6/rmkIKXBVBHwO2/pr36OBX1LP+flzKyIYxc+kuOasGmO/eVrb/hWz7NtThUzWbH8 w9b//lbHmdOv/XDdG3B7j8EfyRWbatRuO7zaY/2Jbd67t+tlXTJMYj+7FO/YevlPZH1z4ss5 q1qzP56abVQgMVe6ONP/rlj6c8ndFilXNxleOXqP13ed3cK/x3a/1HllqSspoCC3omRP19G3 gcJGOlUR/MEH1yqxFGckGmoxFxUnAgB4/XaMKAMAAA== X-CMS-MailID: 20241104141453epcas5p201e4aabfa7aa1f4af1cdf07228f8d4e7 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241104141453epcas5p201e4aabfa7aa1f4af1cdf07228f8d4e7 References: <20241104140601.12239-1-anuj20.g@samsung.com> Add flags to describe checks for integrity meta buffer. Also, introduce a new 'uio_meta' structure that upper layer can use to pass the meta/integrity information. Signed-off-by: Kanchan Joshi Signed-off-by: Anuj Gupta Reviewed-by: Christoph Hellwig --- include/linux/uio.h | 9 +++++++++ include/uapi/linux/fs.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/include/linux/uio.h b/include/linux/uio.h index 853f9de5aa05..8ada84e85447 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -82,6 +82,15 @@ struct iov_iter { }; }; +typedef __u16 uio_meta_flags_t; + +struct uio_meta { + uio_meta_flags_t flags; + u16 app_tag; + u64 seed; + struct iov_iter iter; +}; + static inline const struct iovec *iter_iov(const struct iov_iter *iter) { if (iter->iter_type == ITER_UBUF) diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 753971770733..9070ef19f0a3 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -40,6 +40,15 @@ #define BLOCK_SIZE_BITS 10 #define BLOCK_SIZE (1<