diff mbox series

[v3,05/10] block: define meta io descriptor

Message ID 20240823103811.2421-6-anuj20.g@samsung.com (mailing list archive)
State New
Headers show
Series [v3,01/10] block: define set of integrity flags to be inherited by cloned bip | expand

Commit Message

Anuj Gupta Aug. 23, 2024, 10:38 a.m. UTC
From: Kanchan Joshi <joshi.k@samsung.com>

Introduces a new 'uio_meta' structure that upper layer can
use to pass the meta/integrity information.

Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
---
 include/linux/bio-integrity.h | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Christoph Hellwig Aug. 24, 2024, 8:31 a.m. UTC | #1
On Fri, Aug 23, 2024 at 04:08:05PM +0530, Anuj Gupta wrote:
> +struct uio_meta {
> +	meta_flags_t	flags;
> +	u16		app_tag;
> +	struct		iov_iter iter;
> +};

Odd formatting here - the aligning tab goes before the field name,
not the name of the structure type.
Martin K. Petersen Aug. 29, 2024, 3:05 a.m. UTC | #2
Anuj,

> +struct uio_meta {
> +	meta_flags_t	flags;
> +	u16		app_tag;
> +	struct		iov_iter iter;
> +};

What about the ref tag seed? Or does the proposed API assume that the
first block of the I/O always has a ref tag of 0?
diff mbox series

Patch

diff --git a/include/linux/bio-integrity.h b/include/linux/bio-integrity.h
index 5313811dc1ce..a1a9031a5985 100644
--- a/include/linux/bio-integrity.h
+++ b/include/linux/bio-integrity.h
@@ -30,6 +30,15 @@  struct bio_integrity_payload {
 	struct bio_vec		bip_inline_vecs[];/* embedded bvec array */
 };
 
+/* flags for integrity meta */
+typedef __u16 __bitwise meta_flags_t;
+
+struct uio_meta {
+	meta_flags_t	flags;
+	u16		app_tag;
+	struct		iov_iter iter;
+};
+
 #define BIP_CLONE_FLAGS (BIP_MAPPED_INTEGRITY | BIP_CTRL_NOCHECK | \
 			 BIP_DISK_NOCHECK | BIP_IP_CHECKSUM)