From patchwork Thu Nov 28 11:22:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Gupta X-Patchwork-Id: 13887922 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 BA51A199FBF for ; Thu, 28 Nov 2024 11:46:07 +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=1732794369; cv=none; b=MZowSDAGHgT0ptJXgCRMpARxgKEvmN90+9uUTZQGhmHZaq8T3B7i3F9JIdVuyRvcEZzDQ5IxL2JxagsJz5UhNT6vj1m8z9IZTxfBX9mJ0tXExGl+r6tpFFr4J2SAE5dqkiHgmXvVH8K2ANmU8FQNaPieOQvZzZWsjHSgQM+oWbc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732794369; c=relaxed/simple; bh=uDUb87C52DXoVA3KvOoAoNEyjHqrw30MJR/Iqxaidaw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=cJUZYsJOInXtbxX9fECr3FwprjKyx4FDPy51PEKLuYZ69a97ErhkgluvSiqE1hyHvCYHWYxml8nmzb3QhRcCpfOT63rxTnyRZedToysWKVQ+NXl/zLg8oas02aJbibsj97Sxqzd9SaGJneIkwgaeQ6vvdHn+DU3qBuo78WHTI6A= 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=uMtaylQL; 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="uMtaylQL" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20241128114606epoutp0394b301190a8b69184423e5c7c41e36ae~MH0uYp-tc3191131911epoutp03M for ; Thu, 28 Nov 2024 11:46:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20241128114606epoutp0394b301190a8b69184423e5c7c41e36ae~MH0uYp-tc3191131911epoutp03M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1732794366; bh=sPCiH7C8otAPeKBQxafGfpBc//4CVwTtOappMXTNYFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uMtaylQLnoirBb+DALUMMNs1Sq6fESXvIKCK1CfhBlWipmk573SecHhPh+FWPF4Mi Q3qR+G9hFjKwCCsvxBX9xaiuvAO60ZJw/vP/bGrZ6qc5tjhQQwd+muNC2DRbpuHQAh AUW3uuKGooTmrDIcg/N3O5D31I+c+VmKhoEiK3ys= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20241128114605epcas5p1cec9fb18659d8b581ddfd082482705c0~MH0tcaPjF1146111461epcas5p1h; Thu, 28 Nov 2024 11:46:05 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.182]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4XzZJW2JG3z4x9Pw; Thu, 28 Nov 2024 11:46:03 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 23.29.29212.BF758476; Thu, 28 Nov 2024 20:46:03 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20241128113104epcas5p4c4bd9f936403295e4cbac7c1f52d9b30~MHnmLIkgM1913419134epcas5p4B; Thu, 28 Nov 2024 11:31:03 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20241128113103epsmtrp142fbee2b6480ba49bc6b2a5d7da9e078~MHnmIgq-70051900519epsmtrp1R; Thu, 28 Nov 2024 11:31:03 +0000 (GMT) X-AuditID: b6c32a50-7ebff7000000721c-d0-674857fbb6d9 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 12.5E.18949.77458476; Thu, 28 Nov 2024 20:31:03 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20241128113101epsmtip2c8b97814a32da798b63cc7169b26c181~MHnjvILQO2660826608epsmtip2P; Thu, 28 Nov 2024 11:31:01 +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 v11 04/10] fs, iov_iter: define meta io descriptor Date: Thu, 28 Nov 2024 16:52:34 +0530 Message-Id: <20241128112240.8867-5-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: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAA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jHNWI6y7YJ7Mtu3zw5Q+NZ/jLh/atnrS7/ Kd2zws03yMy/ouvr1IMP5lUlMcyrfiifGS3pVOQnKb7ut/y21evWp18X1Llu8P5Z8YcFkv3O cyevKaiYGvlSoYlN3J5vbofSh9tnJjiXPt29v3BOX1J0DPsMxVh111lFwvsjRDp5JYou2X9I bf/Y6/K35PiiC/fvBG3s19/s8N80eW2R2Cfzq/82P/Lqd53wJ8BOXGzmC+ZcF533UcGCyQan mZl4HlibblT+osRSnJFoqMVcVJwIAApfE90nAwAA X-CMS-MailID: 20241128113104epcas5p4c4bd9f936403295e4cbac7c1f52d9b30 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241128113104epcas5p4c4bd9f936403295e4cbac7c1f52d9b30 References: <20241128112240.8867-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<