From patchwork Tue Oct 29 16:23:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Gupta X-Patchwork-Id: 839543 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 5E1B71D9665 for ; Tue, 29 Oct 2024 17:23:50 +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=1730222632; cv=none; b=iB8m3L+2ddSciOjRAxr0v6k2OwriawrtIwnMi3xzHvTMcZwitsKbdRfT9w29PpJT4LZ6mNIG6av/xMlW4AjtEEy1g41vQuJm7PzfmkHUuYamo07q/3JKAH281IGvKHmHEGxm4T+mUfuEPmAO77aqHsDORmB+ckdW73SeUPvwtTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730222632; c=relaxed/simple; bh=6Jsyj+yD2Vbk8Dl+vuFoXvjbwlYWR2rPusXgpoT9Lyo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=G56dPqA0LEHbhylBe3F7cIFdZJDDvBDSbI82DDIA4308OPCmBqk6YXMi5KEbpS8W8GLQHjmTT1+oF1b551J6sKlzqEecHAexMPdacixS0iMJm3m1HkXbCehoFf+EoYE8sMI9lxaYL5e/rEflXl5eq7VMAy1MOwSpThWpdUDZLUI= 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=OUgFSPyu; 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="OUgFSPyu" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20241029172348epoutp010a5d3653a2347aa5eafe30729b503f10~C-FBWpC222983329833epoutp01J for ; Tue, 29 Oct 2024 17:23:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20241029172348epoutp010a5d3653a2347aa5eafe30729b503f10~C-FBWpC222983329833epoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1730222628; bh=RUxSD6cm/2/oRpjJQ/qX5pi0ZZMenTN0KcQUO7F+Cjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OUgFSPyuH99B16995/j89/QOEcBpc8oLvwV3dwk50KDnMdF7RncNZA9kwq18UZhOL DNqu2vsljSlIxA83MkAD7yEvHdiD7dfoH4HPbXT4QHMuFYVgAEey/aMg53NfMnN6UO 6A/YQi7AHnJpYIwJfomeEKLLy4FS58sp9lDagdw0= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20241029172348epcas5p1ef1585b46b83aa08f29a5a73359ad0f3~C-FAy1jzA0899208992epcas5p1K; Tue, 29 Oct 2024 17:23:48 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.176]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4XdHD31511z4x9Pt; Tue, 29 Oct 2024 17:23:47 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 58.7A.18935.22A11276; Wed, 30 Oct 2024 02:23:46 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20241029163220epcas5p2207d4c54b8c4811e973fca601fd7e3f5~C_YEu6-ss0970309703epcas5p2B; Tue, 29 Oct 2024 16:32:20 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20241029163220epsmtrp184c6055921ab0b6389e5209895ed85f2~C_YEuC6yO0708307083epsmtrp1M; Tue, 29 Oct 2024 16:32:20 +0000 (GMT) X-AuditID: b6c32a50-cb1f8700000049f7-bb-67211a22e017 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 3A.4B.07371.31E01276; Wed, 30 Oct 2024 01:32:19 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20241029163217epsmtip253344fee5699a83a61ae5feaa5096850~C_YCQ_AR70998409984epsmtip2X; Tue, 29 Oct 2024 16:32:17 +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 v5 04/10] fs, iov_iter: define meta io descriptor Date: Tue, 29 Oct 2024 21:53:56 +0530 Message-Id: <20241029162402.21400-5-anuj20.g@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241029162402.21400-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: H4sIAAAAAAAAA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s+T7+6Nu/Mq2Pzc9ff6Gno8r GO89E/VSjP+nZh/Z/73MsXDHHpEefqX1z3V2tafdW7RdfPf3236Tz39L2t9+irkgxfxBbZ1T Ud+CN0kJ3Ud2HsyY2CVlE29sGXDh6DWpTtV2NsP5ioFbpj+dt/qXymaJss0XU81l7gfPvzat 52j4oeVyr9q/RmgnaqmbH94n12LMXrDlZopgTXTp3nU7ntlwvWr10bcpFDofelf2jcnH6bIy TDutZvw+lta/j/eiEktxRqKhFnNRcSIAyLvsDCcDAAA= X-CMS-MailID: 20241029163220epcas5p2207d4c54b8c4811e973fca601fd7e3f5 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241029163220epcas5p2207d4c54b8c4811e973fca601fd7e3f5 References: <20241029162402.21400-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 --- include/linux/uio.h | 10 ++++++++++ include/uapi/linux/fs.h | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/include/linux/uio.h b/include/linux/uio.h index 853f9de5aa05..eb3eee957a7d 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -82,6 +82,16 @@ struct iov_iter { }; }; +/* flags for integrity meta */ +typedef __u16 __bitwise 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<