]> Gentwo Git Trees - linux/.git/commit
iomap: support write completions from interrupt context
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Nov 2025 17:06:29 +0000 (18:06 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 25 Nov 2025 09:22:19 +0000 (10:22 +0100)
commiteca9dc20891de4ce6b7f012ac157ca6f8fa12ce4
treeaa80565faf595b20f31d2f0f0c0fc93cc8a67de9
parent29086a31b3abc662d0571ed6a938937ec1e1ec0a
iomap: support write completions from interrupt context

Completions for pure overwrites don't need to be deferred to a workqueue
as there is no work to be done, or at least no work that needs a user
context.  Set the IOMAP_DIO_INLINE_COMP by default for writes like we
already do for reads, and the clear it for all the cases that actually
do need a user context for completions to update the inode size or
record updates to the logical to physical mapping.

I've audited all users of the ->end_io callback, and they only require
user context for I/O that involves unwritten extents, COW, size
extensions, or error handling and all those are still run from workqueue
context.

This restores the behavior of the old pre-iomap direct I/O code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251113170633.1453259-5-hch@lst.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/direct-io.c