bio completion in task enhancements / experiments

Christoph Hellwig
2026-04-09T16:03:05Z

Hi all,

this series builds on top of:

Subject: [PATCH RFC v5 0/3] block: enable RWF_DONTCACHE for block devices

which I fixed up to apply to linux-next. If you want to seriously review
or test this, you're best off using the git branch here:

https://git.infradead.org/?p=users/hch/misc.git;a=shortlog;h=refs/heads/bio-task-completion

it first makes the complete in task interface more flexible so that it
can also be used from inside the ->bi_end_io handlers, which we'll need
for a few uses cases. The second patch fixes the offload condition, the
next two then convert to uses in iomap added in the current merge window
over to the interface.

The last patch plays with the implementation and reuses concepts from
erofs to reduce the completion latency at the expense of more always
alive threads.

There's a few other places that could benefit from this, like erofs
decompression, PI verification in the block and file systems paths, or
fscrypt decryption.

Diffstat:
block/bio.c | 93 ++++++++++++++++++++++++++++++++++++++++++++
block/fops.c | 5 +-
fs/buffer.c | 25 ++++++++++-
fs/iomap/bio.c | 44 --------------------
fs/iomap/ioend.c | 53 +++----------------------
fs/xfs/xfs_aops.c | 4 -
include/linux/bio.h | 28 +++++++++++++
include/linux/blk_types.h | 6 ++
include/linux/buffer_head.h | 5 ++
9 files changed, 165 insertions(+), 98 deletions(-)