]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iomap: support T10 protection information
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Feb 2026 13:20:15 +0000 (05:20 -0800)
committerChristian Brauner <brauner@kernel.org>
Tue, 10 Mar 2026 09:29:17 +0000 (10:29 +0100)
commit0b10a370529cbd7b918c1eef43d409e43d9e0b78
tree7ebcb4c8d20916325f712db46d4975b1f71f8e1f
parente8f9cf03c9dc94b475ae8f172ecd700806846a6d
iomap: support T10 protection information

Add support for generating / verifying protection information in iomap.
This is done by hooking into the bio submission and then using the
generic PI helpers.  Compared to just using the block layer auto PI
this extends the protection envelope and also prepares for eventually
passing through PI from userspace at least for direct I/O.

To generate or verify PI, the file system needs to set the
IOMAP_F_INTEGRITY flag on the iomap for the request, and ensure the
ioends are used for all integrity I/O.  Additionally the file system
must defer read I/O completions to user context so that the guard
tag validation isn't run from interrupt context.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260223132021.292832-16-hch@lst.de
Tested-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/bio.c
fs/iomap/direct-io.c
fs/iomap/internal.h
fs/iomap/ioend.c
include/linux/iomap.h