]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iomap: allow file systems to hook into buffered read bio submission
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Feb 2026 13:20:11 +0000 (05:20 -0800)
committerChristian Brauner <brauner@kernel.org>
Tue, 10 Mar 2026 09:29:03 +0000 (10:29 +0100)
commit5f4fe046cb3c84eed719f7becbe822000e1a589e
tree01113d4300e65fb6be324e83f8b9f4583f8245f6
parent19fb5f9780753bf99065f13e29cf5761eb5380db
iomap: allow file systems to hook into buffered read bio submission

File systems such as btrfs have additional operations with bios such as
verifying data checksums.  Allow file systems to hook into submission
of the bio to allow for this processing by replacing the direct
submit_bio call in iomap_read_alloc_bio with a call into ->submit_read
and exporting iomap_read_alloc_bio.  Also add a new field to
struct iomap_read_folio_ctx to track the file logic offset of the current
read context.

Based on a patch from Goldwyn Rodrigues <rgoldwyn@suse.com>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260223132021.292832-12-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
include/linux/iomap.h